mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 06:50:07 +01:00
Misc fixes and tweaks to many demos
This commit is contained in:
@@ -9,7 +9,7 @@ radius = 16.0
|
|||||||
[node name="Troll" type="KinematicBody2D"]
|
[node name="Troll" type="KinematicBody2D"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite2D" type="Sprite" parent="."]
|
||||||
texture = ExtResource( 2 )
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ points = PoolVector2Array( -40, 16, 24, -16, 40, -8, -24, 24 )
|
|||||||
0/tile_mode = 0
|
0/tile_mode = 0
|
||||||
0/occluder_offset = Vector2( 67.5, 52.5 )
|
0/occluder_offset = Vector2( 67.5, 52.5 )
|
||||||
0/navigation_offset = Vector2( 67.5, 52.5 )
|
0/navigation_offset = Vector2( 67.5, 52.5 )
|
||||||
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 0.0
|
||||||
0/shapes = [ ]
|
0/shapes = [ ]
|
||||||
0/z_index = 0
|
0/z_index = 0
|
||||||
1/name = "Base2"
|
1/name = "Base2"
|
||||||
@@ -30,6 +34,10 @@ points = PoolVector2Array( -40, 16, 24, -16, 40, -8, -24, 24 )
|
|||||||
1/tile_mode = 0
|
1/tile_mode = 0
|
||||||
1/occluder_offset = Vector2( 67.5, 52.5 )
|
1/occluder_offset = Vector2( 67.5, 52.5 )
|
||||||
1/navigation_offset = Vector2( 67.5, 52.5 )
|
1/navigation_offset = Vector2( 67.5, 52.5 )
|
||||||
|
1/shape_offset = Vector2( 0, 0 )
|
||||||
|
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
1/shape_one_way = false
|
||||||
|
1/shape_one_way_margin = 0.0
|
||||||
1/shapes = [ ]
|
1/shapes = [ ]
|
||||||
1/z_index = 0
|
1/z_index = 0
|
||||||
2/name = "Wall"
|
2/name = "Wall"
|
||||||
@@ -40,6 +48,11 @@ points = PoolVector2Array( -40, 16, 24, -16, 40, -8, -24, 24 )
|
|||||||
2/tile_mode = 0
|
2/tile_mode = 0
|
||||||
2/occluder_offset = Vector2( 70, 70 )
|
2/occluder_offset = Vector2( 70, 70 )
|
||||||
2/navigation_offset = Vector2( 70, 70 )
|
2/navigation_offset = Vector2( 70, 70 )
|
||||||
|
2/shape_offset = Vector2( 70, 70 )
|
||||||
|
2/shape_transform = Transform2D( 1, 0, 0, 1, 70, 70 )
|
||||||
|
2/shape = SubResource( 1 )
|
||||||
|
2/shape_one_way = false
|
||||||
|
2/shape_one_way_margin = 1.0
|
||||||
2/shapes = [ {
|
2/shapes = [ {
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
"one_way": false,
|
"one_way": false,
|
||||||
@@ -56,6 +69,11 @@ points = PoolVector2Array( -40, 16, 24, -16, 40, -8, -24, 24 )
|
|||||||
3/tile_mode = 0
|
3/tile_mode = 0
|
||||||
3/occluder_offset = Vector2( 27.5, 47.5 )
|
3/occluder_offset = Vector2( 27.5, 47.5 )
|
||||||
3/navigation_offset = Vector2( 27.5, 47.5 )
|
3/navigation_offset = Vector2( 27.5, 47.5 )
|
||||||
|
3/shape_offset = Vector2( 29.5, 47.5 )
|
||||||
|
3/shape_transform = Transform2D( 1, 0, 0, 1, 29.5, 47.5 )
|
||||||
|
3/shape = SubResource( 2 )
|
||||||
|
3/shape_one_way = false
|
||||||
|
3/shape_one_way_margin = 1.0
|
||||||
3/shapes = [ {
|
3/shapes = [ {
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
"one_way": false,
|
"one_way": false,
|
||||||
@@ -72,6 +90,11 @@ points = PoolVector2Array( -40, 16, 24, -16, 40, -8, -24, 24 )
|
|||||||
4/tile_mode = 0
|
4/tile_mode = 0
|
||||||
4/occluder_offset = Vector2( 42.5, 55 )
|
4/occluder_offset = Vector2( 42.5, 55 )
|
||||||
4/navigation_offset = Vector2( 42.5, 55 )
|
4/navigation_offset = Vector2( 42.5, 55 )
|
||||||
|
4/shape_offset = Vector2( 42.5, 55 )
|
||||||
|
4/shape_transform = Transform2D( 1, 0, 0, 1, 42.5, 55 )
|
||||||
|
4/shape = SubResource( 3 )
|
||||||
|
4/shape_one_way = false
|
||||||
|
4/shape_one_way_margin = 1.0
|
||||||
4/shapes = [ {
|
4/shapes = [ {
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
"one_way": false,
|
"one_way": false,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ script = ExtResource( 2 )
|
|||||||
position = Vector2( 32, 32 )
|
position = Vector2( 32, 32 )
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="Character"]
|
[node name="Sprite2D" type="Sprite" parent="Character"]
|
||||||
position = Vector2( 7, 0 )
|
position = Vector2( 7, 0 )
|
||||||
texture = ExtResource( 4 )
|
texture = ExtResource( 4 )
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ visibility_rect = Rect2( 26.0055, 90.0015, 199.176, 95.0445 )
|
|||||||
process_material = SubResource( 26 )
|
process_material = SubResource( 26 )
|
||||||
texture = ExtResource( 3 )
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="Outline_Mask" type="Particles2D" parent="."]
|
[node name="OutlineMask" type="Particles2D" parent="."]
|
||||||
position = Vector2( 42, 52 )
|
position = Vector2( 42, 52 )
|
||||||
amount = 180
|
amount = 180
|
||||||
lifetime = 0.2
|
lifetime = 0.2
|
||||||
@@ -244,7 +244,7 @@ visibility_rect = Rect2( 26.0055, 90.0015, 199.176, 95.0445 )
|
|||||||
process_material = SubResource( 27 )
|
process_material = SubResource( 27 )
|
||||||
texture = ExtResource( 3 )
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="Direction_Mask" type="Particles2D" parent="."]
|
[node name="DirectionMask" type="Particles2D" parent="."]
|
||||||
position = Vector2( 40, 180 )
|
position = Vector2( 40, 180 )
|
||||||
amount = 180
|
amount = 180
|
||||||
lifetime = 0.2
|
lifetime = 0.2
|
||||||
|
|||||||
@@ -3,209 +3,347 @@
|
|||||||
[ext_resource path="res://tiles_demo.png" type="Texture" id=1]
|
[ext_resource path="res://tiles_demo.png" type="Texture" id=1]
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, -12, 16, -12, 16, 16, -16, 16 )
|
points = PoolVector2Array( -16, -12, 16, -12, 16, 16, -16, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, 16, -16, -12, 12, -12, 12, 16 )
|
points = PoolVector2Array( -16, 16, -16, -12, 12, -12, 12, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, -16, 16, -16, 16, 16, -16, 16 )
|
points = PoolVector2Array( -16, -16, 16, -16, 16, 16, -16, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, -28, 16, 4, 16, 32, -16, 32 )
|
points = PoolVector2Array( -16, -28, 16, 4, 16, 32, -16, 32 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
[sub_resource type="ConvexPolygonShape2D" id=5]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, 16, -16, -16, 12, -16, 12, 16 )
|
points = PoolVector2Array( -16, 16, -16, -16, 12, -16, 12, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=6]
|
[sub_resource type="ConvexPolygonShape2D" id=6]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, -12, 16, -12, 16, 12, -16, 12 )
|
points = PoolVector2Array( -16, -12, 16, -12, 16, 12, -16, 12 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=7]
|
[sub_resource type="ConvexPolygonShape2D" id=7]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, -12, 12, -12, 12, 12, -16, 12 )
|
points = PoolVector2Array( -16, -12, 12, -12, 12, 12, -16, 12 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=8]
|
[sub_resource type="ConvexPolygonShape2D" id=8]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, 16, -16, -16, 12, -16, 12, 16 )
|
points = PoolVector2Array( -16, 16, -16, -16, 12, -16, 12, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=9]
|
[sub_resource type="ConvexPolygonShape2D" id=9]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -32, 16, -32, -16, -4, -16, -4, 16 )
|
points = PoolVector2Array( -32, 16, -32, -16, -4, -16, -4, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=10]
|
[sub_resource type="ConvexPolygonShape2D" id=10]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, 16, -16, -16, 12, -16, 16, -12, 16, 16 )
|
points = PoolVector2Array( -16, 16, -16, -16, 12, -16, 16, -12, 16, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=11]
|
[sub_resource type="ConvexPolygonShape2D" id=11]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, 16, -16, -12, 16, -12, 16, 16 )
|
points = PoolVector2Array( -16, 16, -16, -12, 16, -12, 16, 16 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=12]
|
[sub_resource type="ConvexPolygonShape2D" id=12]
|
||||||
|
|
||||||
custom_solver_bias = 0.0
|
|
||||||
points = PoolVector2Array( -16, 16, -16, -12, 16, -12, 16, 16 )
|
points = PoolVector2Array( -16, 16, -16, -12, 16, -12, 16, 16 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
|
||||||
0/name = "floor"
|
0/name = "floor"
|
||||||
0/texture = ExtResource( 1 )
|
0/texture = ExtResource( 1 )
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
0/region = Rect2( 0, 0, 32, 32 )
|
0/region = Rect2( 0, 0, 32, 32 )
|
||||||
|
0/tile_mode = 0
|
||||||
0/occluder_offset = Vector2( 16, 16 )
|
0/occluder_offset = Vector2( 16, 16 )
|
||||||
0/navigation_offset = Vector2( 16, 16 )
|
0/navigation_offset = Vector2( 16, 16 )
|
||||||
0/shape_offset = Vector2( 16, 16 )
|
0/shape_offset = Vector2( 16, 16 )
|
||||||
0/shapes = [ SubResource( 1 ) ]
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
0/shape = SubResource( 1 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 1.0
|
||||||
|
0/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 1 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
0/z_index = 0
|
||||||
1/name = "edge"
|
1/name = "edge"
|
||||||
1/texture = ExtResource( 1 )
|
1/texture = ExtResource( 1 )
|
||||||
1/tex_offset = Vector2( 0, 0 )
|
1/tex_offset = Vector2( 0, 0 )
|
||||||
1/modulate = Color( 1, 1, 1, 1 )
|
1/modulate = Color( 1, 1, 1, 1 )
|
||||||
1/region = Rect2( 32, 0, 32, 32 )
|
1/region = Rect2( 32, 0, 32, 32 )
|
||||||
|
1/tile_mode = 0
|
||||||
1/occluder_offset = Vector2( 16, 16 )
|
1/occluder_offset = Vector2( 16, 16 )
|
||||||
1/navigation_offset = Vector2( 16, 16 )
|
1/navigation_offset = Vector2( 16, 16 )
|
||||||
1/shape_offset = Vector2( 16, 16 )
|
1/shape_offset = Vector2( 16, 16 )
|
||||||
1/shapes = [ SubResource( 2 ) ]
|
1/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
1/shape = SubResource( 2 )
|
||||||
|
1/shape_one_way = false
|
||||||
|
1/shape_one_way_margin = 1.0
|
||||||
|
1/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 2 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
1/z_index = 0
|
||||||
2/name = "wall"
|
2/name = "wall"
|
||||||
2/texture = ExtResource( 1 )
|
2/texture = ExtResource( 1 )
|
||||||
2/tex_offset = Vector2( 0, 0 )
|
2/tex_offset = Vector2( 0, 0 )
|
||||||
2/modulate = Color( 1, 1, 1, 1 )
|
2/modulate = Color( 1, 1, 1, 1 )
|
||||||
2/region = Rect2( 32, 32, 32, 32 )
|
2/region = Rect2( 32, 32, 32, 32 )
|
||||||
|
2/tile_mode = 0
|
||||||
2/occluder_offset = Vector2( 16, 16 )
|
2/occluder_offset = Vector2( 16, 16 )
|
||||||
2/navigation_offset = Vector2( 16, 16 )
|
2/navigation_offset = Vector2( 16, 16 )
|
||||||
2/shape_offset = Vector2( 16, 16 )
|
2/shape_offset = Vector2( 16, 16 )
|
||||||
2/shapes = [ SubResource( 8 ) ]
|
2/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
2/shape = SubResource( 8 )
|
||||||
|
2/shape_one_way = false
|
||||||
|
2/shape_one_way_margin = 1.0
|
||||||
|
2/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 8 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
2/z_index = 0
|
||||||
3/name = "wall_deco"
|
3/name = "wall_deco"
|
||||||
3/texture = ExtResource( 1 )
|
3/texture = ExtResource( 1 )
|
||||||
3/tex_offset = Vector2( 0, 0 )
|
3/tex_offset = Vector2( 0, 0 )
|
||||||
3/modulate = Color( 1, 1, 1, 1 )
|
3/modulate = Color( 1, 1, 1, 1 )
|
||||||
3/region = Rect2( 160, 64, 64, 32 )
|
3/region = Rect2( 160, 64, 64, 32 )
|
||||||
|
3/tile_mode = 0
|
||||||
3/occluder_offset = Vector2( 32, 16 )
|
3/occluder_offset = Vector2( 32, 16 )
|
||||||
3/navigation_offset = Vector2( 32, 16 )
|
3/navigation_offset = Vector2( 32, 16 )
|
||||||
3/shape_offset = Vector2( 32, 16 )
|
3/shape_offset = Vector2( 32, 16 )
|
||||||
3/shapes = [ SubResource( 9 ) ]
|
3/shape_transform = Transform2D( 1, 0, 0, 1, 32, 16 )
|
||||||
|
3/shape = SubResource( 9 )
|
||||||
|
3/shape_one_way = false
|
||||||
|
3/shape_one_way_margin = 1.0
|
||||||
|
3/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 9 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 32, 16 )
|
||||||
|
} ]
|
||||||
|
3/z_index = 0
|
||||||
4/name = "corner"
|
4/name = "corner"
|
||||||
4/texture = ExtResource( 1 )
|
4/texture = ExtResource( 1 )
|
||||||
4/tex_offset = Vector2( 0, 0 )
|
4/tex_offset = Vector2( 0, 0 )
|
||||||
4/modulate = Color( 1, 1, 1, 1 )
|
4/modulate = Color( 1, 1, 1, 1 )
|
||||||
4/region = Rect2( 32, 64, 32, 32 )
|
4/region = Rect2( 32, 64, 32, 32 )
|
||||||
|
4/tile_mode = 0
|
||||||
4/occluder_offset = Vector2( 16, 16 )
|
4/occluder_offset = Vector2( 16, 16 )
|
||||||
4/navigation_offset = Vector2( 16, 16 )
|
4/navigation_offset = Vector2( 16, 16 )
|
||||||
4/shape_offset = Vector2( 16, 16 )
|
4/shape_offset = Vector2( 16, 16 )
|
||||||
4/shapes = [ SubResource( 10 ) ]
|
4/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
4/shape = SubResource( 10 )
|
||||||
|
4/shape_one_way = false
|
||||||
|
4/shape_one_way_margin = 1.0
|
||||||
|
4/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 10 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
4/z_index = 0
|
||||||
5/name = "flowers"
|
5/name = "flowers"
|
||||||
5/texture = ExtResource( 1 )
|
5/texture = ExtResource( 1 )
|
||||||
5/tex_offset = Vector2( 0, 0 )
|
5/tex_offset = Vector2( 0, 0 )
|
||||||
5/modulate = Color( 1, 1, 1, 1 )
|
5/modulate = Color( 1, 1, 1, 1 )
|
||||||
5/region = Rect2( 96, 96, 32, 32 )
|
5/region = Rect2( 96, 96, 32, 32 )
|
||||||
|
5/tile_mode = 0
|
||||||
5/occluder_offset = Vector2( 16, 16 )
|
5/occluder_offset = Vector2( 16, 16 )
|
||||||
5/navigation_offset = Vector2( 16, 16 )
|
5/navigation_offset = Vector2( 16, 16 )
|
||||||
5/shape_offset = Vector2( 16, 16 )
|
5/shape_offset = Vector2( 16, 16 )
|
||||||
5/shapes = [ SubResource( 11 ) ]
|
5/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
5/shape = SubResource( 11 )
|
||||||
|
5/shape_one_way = false
|
||||||
|
5/shape_one_way_margin = 1.0
|
||||||
|
5/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 11 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
5/z_index = 0
|
||||||
6/name = "tree_base"
|
6/name = "tree_base"
|
||||||
6/texture = ExtResource( 1 )
|
6/texture = ExtResource( 1 )
|
||||||
6/tex_offset = Vector2( 0, 0 )
|
6/tex_offset = Vector2( 0, 0 )
|
||||||
6/modulate = Color( 1, 1, 1, 1 )
|
6/modulate = Color( 1, 1, 1, 1 )
|
||||||
6/region = Rect2( 128, 96, 32, 32 )
|
6/region = Rect2( 128, 96, 32, 32 )
|
||||||
|
6/tile_mode = 0
|
||||||
6/occluder_offset = Vector2( 16, 16 )
|
6/occluder_offset = Vector2( 16, 16 )
|
||||||
6/navigation_offset = Vector2( 16, 16 )
|
6/navigation_offset = Vector2( 16, 16 )
|
||||||
6/shape_offset = Vector2( 16, 16 )
|
6/shape_offset = Vector2( 16, 16 )
|
||||||
6/shapes = [ SubResource( 12 ) ]
|
6/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
6/shape = SubResource( 12 )
|
||||||
|
6/shape_one_way = false
|
||||||
|
6/shape_one_way_margin = 1.0
|
||||||
|
6/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 12 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
6/z_index = 0
|
||||||
7/name = "tree_mid"
|
7/name = "tree_mid"
|
||||||
7/texture = ExtResource( 1 )
|
7/texture = ExtResource( 1 )
|
||||||
7/tex_offset = Vector2( 0, 0 )
|
7/tex_offset = Vector2( 0, 0 )
|
||||||
7/modulate = Color( 1, 1, 1, 1 )
|
7/modulate = Color( 1, 1, 1, 1 )
|
||||||
7/region = Rect2( 128, 64, 32, 32 )
|
7/region = Rect2( 128, 64, 32, 32 )
|
||||||
|
7/tile_mode = 0
|
||||||
7/occluder_offset = Vector2( 16, 16 )
|
7/occluder_offset = Vector2( 16, 16 )
|
||||||
7/navigation_offset = Vector2( 16, 16 )
|
7/navigation_offset = Vector2( 16, 16 )
|
||||||
7/shape_offset = Vector2( 0, 0 )
|
7/shape_offset = Vector2( 0, 0 )
|
||||||
|
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
7/shape_one_way = false
|
||||||
|
7/shape_one_way_margin = 0.0
|
||||||
7/shapes = [ ]
|
7/shapes = [ ]
|
||||||
|
7/z_index = 0
|
||||||
8/name = "tree_mid 2"
|
8/name = "tree_mid 2"
|
||||||
8/texture = ExtResource( 1 )
|
8/texture = ExtResource( 1 )
|
||||||
8/tex_offset = Vector2( 0, 0 )
|
8/tex_offset = Vector2( 0, 0 )
|
||||||
8/modulate = Color( 1, 1, 1, 1 )
|
8/modulate = Color( 1, 1, 1, 1 )
|
||||||
8/region = Rect2( 128, 32, 32, 32 )
|
8/region = Rect2( 128, 32, 32, 32 )
|
||||||
|
8/tile_mode = 0
|
||||||
8/occluder_offset = Vector2( 16, 16 )
|
8/occluder_offset = Vector2( 16, 16 )
|
||||||
8/navigation_offset = Vector2( 16, 16 )
|
8/navigation_offset = Vector2( 16, 16 )
|
||||||
8/shape_offset = Vector2( 0, 0 )
|
8/shape_offset = Vector2( 0, 0 )
|
||||||
|
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
8/shape_one_way = false
|
||||||
|
8/shape_one_way_margin = 0.0
|
||||||
8/shapes = [ ]
|
8/shapes = [ ]
|
||||||
|
8/z_index = 0
|
||||||
9/name = "tree_top"
|
9/name = "tree_top"
|
||||||
9/texture = ExtResource( 1 )
|
9/texture = ExtResource( 1 )
|
||||||
9/tex_offset = Vector2( 0, 0 )
|
9/tex_offset = Vector2( 0, 0 )
|
||||||
9/modulate = Color( 1, 1, 1, 1 )
|
9/modulate = Color( 1, 1, 1, 1 )
|
||||||
9/region = Rect2( 128, 0, 32, 32 )
|
9/region = Rect2( 128, 0, 32, 32 )
|
||||||
|
9/tile_mode = 0
|
||||||
9/occluder_offset = Vector2( 16, 16 )
|
9/occluder_offset = Vector2( 16, 16 )
|
||||||
9/navigation_offset = Vector2( 16, 16 )
|
9/navigation_offset = Vector2( 16, 16 )
|
||||||
9/shape_offset = Vector2( 0, 0 )
|
9/shape_offset = Vector2( 0, 0 )
|
||||||
|
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
9/shape_one_way = false
|
||||||
|
9/shape_one_way_margin = 0.0
|
||||||
9/shapes = [ ]
|
9/shapes = [ ]
|
||||||
|
9/z_index = 0
|
||||||
10/name = "solid"
|
10/name = "solid"
|
||||||
10/texture = ExtResource( 1 )
|
10/texture = ExtResource( 1 )
|
||||||
10/tex_offset = Vector2( 0, 0 )
|
10/tex_offset = Vector2( 0, 0 )
|
||||||
10/modulate = Color( 1, 1, 1, 1 )
|
10/modulate = Color( 1, 1, 1, 1 )
|
||||||
10/region = Rect2( 0, 32, 32, 32 )
|
10/region = Rect2( 0, 32, 32, 32 )
|
||||||
|
10/tile_mode = 0
|
||||||
10/occluder_offset = Vector2( 16, 16 )
|
10/occluder_offset = Vector2( 16, 16 )
|
||||||
10/navigation_offset = Vector2( 16, 16 )
|
10/navigation_offset = Vector2( 16, 16 )
|
||||||
10/shape_offset = Vector2( 0, 0 )
|
10/shape_offset = Vector2( 0, 0 )
|
||||||
|
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
10/shape_one_way = false
|
||||||
|
10/shape_one_way_margin = 0.0
|
||||||
10/shapes = [ ]
|
10/shapes = [ ]
|
||||||
|
10/z_index = 0
|
||||||
11/name = "ceiling"
|
11/name = "ceiling"
|
||||||
11/texture = ExtResource( 1 )
|
11/texture = ExtResource( 1 )
|
||||||
11/tex_offset = Vector2( 0, 0 )
|
11/tex_offset = Vector2( 0, 0 )
|
||||||
11/modulate = Color( 1, 1, 1, 1 )
|
11/modulate = Color( 1, 1, 1, 1 )
|
||||||
11/region = Rect2( 192, 32, 32, 32 )
|
11/region = Rect2( 192, 32, 32, 32 )
|
||||||
|
11/tile_mode = 0
|
||||||
11/occluder_offset = Vector2( 16, 16 )
|
11/occluder_offset = Vector2( 16, 16 )
|
||||||
11/navigation_offset = Vector2( 16, 16 )
|
11/navigation_offset = Vector2( 16, 16 )
|
||||||
11/shape_offset = Vector2( 16, 16 )
|
11/shape_offset = Vector2( 16, 16 )
|
||||||
11/shapes = [ SubResource( 3 ) ]
|
11/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
11/shape = SubResource( 3 )
|
||||||
|
11/shape_one_way = false
|
||||||
|
11/shape_one_way_margin = 1.0
|
||||||
|
11/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 3 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
11/z_index = 0
|
||||||
12/name = "ramp"
|
12/name = "ramp"
|
||||||
12/texture = ExtResource( 1 )
|
12/texture = ExtResource( 1 )
|
||||||
12/tex_offset = Vector2( 0, 0 )
|
12/tex_offset = Vector2( 0, 0 )
|
||||||
12/modulate = Color( 1, 1, 1, 1 )
|
12/modulate = Color( 1, 1, 1, 1 )
|
||||||
12/region = Rect2( 64, 64, 32, 64 )
|
12/region = Rect2( 64, 64, 32, 64 )
|
||||||
|
12/tile_mode = 0
|
||||||
12/occluder_offset = Vector2( 16, 32 )
|
12/occluder_offset = Vector2( 16, 32 )
|
||||||
12/navigation_offset = Vector2( 16, 32 )
|
12/navigation_offset = Vector2( 16, 32 )
|
||||||
12/shape_offset = Vector2( 16, 32 )
|
12/shape_offset = Vector2( 16, 32 )
|
||||||
12/shapes = [ SubResource( 4 ) ]
|
12/shape_transform = Transform2D( 1, 0, 0, 1, 16, 32 )
|
||||||
|
12/shape = SubResource( 4 )
|
||||||
|
12/shape_one_way = false
|
||||||
|
12/shape_one_way_margin = 1.0
|
||||||
|
12/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 4 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 32 )
|
||||||
|
} ]
|
||||||
|
12/z_index = 0
|
||||||
13/name = "ceiling2wall"
|
13/name = "ceiling2wall"
|
||||||
13/texture = ExtResource( 1 )
|
13/texture = ExtResource( 1 )
|
||||||
13/tex_offset = Vector2( 0, 0 )
|
13/tex_offset = Vector2( 0, 0 )
|
||||||
13/modulate = Color( 1, 1, 1, 1 )
|
13/modulate = Color( 1, 1, 1, 1 )
|
||||||
13/region = Rect2( 224, 32, 32, 32 )
|
13/region = Rect2( 224, 32, 32, 32 )
|
||||||
|
13/tile_mode = 0
|
||||||
13/occluder_offset = Vector2( 16, 16 )
|
13/occluder_offset = Vector2( 16, 16 )
|
||||||
13/navigation_offset = Vector2( 16, 16 )
|
13/navigation_offset = Vector2( 16, 16 )
|
||||||
13/shape_offset = Vector2( 16, 16 )
|
13/shape_offset = Vector2( 16, 16 )
|
||||||
13/shapes = [ SubResource( 5 ) ]
|
13/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
13/shape = SubResource( 5 )
|
||||||
|
13/shape_one_way = false
|
||||||
|
13/shape_one_way_margin = 1.0
|
||||||
|
13/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 5 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
13/z_index = 0
|
||||||
14/name = "platform_floor"
|
14/name = "platform_floor"
|
||||||
14/texture = ExtResource( 1 )
|
14/texture = ExtResource( 1 )
|
||||||
14/tex_offset = Vector2( 0, 0 )
|
14/tex_offset = Vector2( 0, 0 )
|
||||||
14/modulate = Color( 1, 1, 1, 1 )
|
14/modulate = Color( 1, 1, 1, 1 )
|
||||||
14/region = Rect2( 64, 0, 32, 32 )
|
14/region = Rect2( 64, 0, 32, 32 )
|
||||||
|
14/tile_mode = 0
|
||||||
14/occluder_offset = Vector2( 16, 16 )
|
14/occluder_offset = Vector2( 16, 16 )
|
||||||
14/navigation_offset = Vector2( 16, 16 )
|
14/navigation_offset = Vector2( 16, 16 )
|
||||||
14/shape_offset = Vector2( 16, 16 )
|
14/shape_offset = Vector2( 16, 16 )
|
||||||
14/shapes = [ SubResource( 6 ) ]
|
14/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
14/shape = SubResource( 6 )
|
||||||
|
14/shape_one_way = false
|
||||||
|
14/shape_one_way_margin = 1.0
|
||||||
|
14/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 6 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
14/z_index = 0
|
||||||
15/name = "platform_edge"
|
15/name = "platform_edge"
|
||||||
15/texture = ExtResource( 1 )
|
15/texture = ExtResource( 1 )
|
||||||
15/tex_offset = Vector2( 0, 0 )
|
15/tex_offset = Vector2( 0, 0 )
|
||||||
15/modulate = Color( 1, 1, 1, 1 )
|
15/modulate = Color( 1, 1, 1, 1 )
|
||||||
15/region = Rect2( 96, 0, 32, 32 )
|
15/region = Rect2( 96, 0, 32, 32 )
|
||||||
|
15/tile_mode = 0
|
||||||
15/occluder_offset = Vector2( 16, 16 )
|
15/occluder_offset = Vector2( 16, 16 )
|
||||||
15/navigation_offset = Vector2( 16, 16 )
|
15/navigation_offset = Vector2( 16, 16 )
|
||||||
15/shape_offset = Vector2( 16, 16 )
|
15/shape_offset = Vector2( 16, 16 )
|
||||||
15/shapes = [ SubResource( 7 ) ]
|
15/shape_transform = Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
15/shape = SubResource( 7 )
|
||||||
|
15/shape_one_way = false
|
||||||
|
15/shape_one_way_margin = 1.0
|
||||||
|
15/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 7 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 16, 16 )
|
||||||
|
} ]
|
||||||
|
15/z_index = 0
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ node_b = NodePath("../Pillar")
|
|||||||
[node name="Pillar" type="StaticBody2D" parent="."]
|
[node name="Pillar" type="StaticBody2D" parent="."]
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="Pillar"]
|
[node name="Sprite" type="Sprite" parent="Pillar"]
|
||||||
position = Vector2( -0.1454125, 10.12125 )
|
position = Vector2( 0, 10 )
|
||||||
texture = ExtResource( 2 )
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pillar"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pillar"]
|
||||||
|
|||||||
23
3d/kinematic_character/default_env.tres
Normal file
23
3d/kinematic_character/default_env.tres
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
[gd_resource type="Environment" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSky" id=1]
|
||||||
|
radiance_size = 1
|
||||||
|
sky_top_color = Color( 0.219882, 0.193725, 0.366471, 1 )
|
||||||
|
sky_horizon_color = Color( 0.342622, 0.0655002, 0.558935, 1 )
|
||||||
|
sky_curve = 0.0490365
|
||||||
|
ground_bottom_color = Color( 0.0342205, 0.0333383, 0.0322154, 1 )
|
||||||
|
ground_horizon_color = Color( 0.148289, 0.138067, 0.125119, 1 )
|
||||||
|
ground_curve = 0.25
|
||||||
|
sun_latitude = 55.0
|
||||||
|
sun_longitude = -80.0
|
||||||
|
texture_size = 0
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
background_mode = 2
|
||||||
|
background_sky = SubResource( 1 )
|
||||||
|
ssao_blur = 1
|
||||||
|
glow_levels/7 = true
|
||||||
|
glow_strength = 0.79
|
||||||
|
glow_bloom = 1.0
|
||||||
|
glow_blend_mode = 0
|
||||||
|
glow_bicubic_upscale = true
|
||||||
@@ -1,29 +1,9 @@
|
|||||||
[gd_scene load_steps=17 format=2]
|
[gd_scene load_steps=16 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://cubelib.tres" type="MeshLibrary" id=1]
|
[ext_resource path="res://cubelib.tres" type="MeshLibrary" id=1]
|
||||||
[ext_resource path="res://cubio.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://cubio.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://purple_wood.png" type="Texture" id=3]
|
[ext_resource path="res://purple_wood.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://default_env.tres" type="Environment" id=4]
|
||||||
[sub_resource type="ProceduralSky" id=1]
|
|
||||||
radiance_size = 1
|
|
||||||
sky_top_color = Color( 0.219882, 0.193725, 0.366471, 1 )
|
|
||||||
sky_horizon_color = Color( 0.342622, 0.0655002, 0.558935, 1 )
|
|
||||||
sky_curve = 0.0490365
|
|
||||||
ground_bottom_color = Color( 0.0342205, 0.0333383, 0.0322154, 1 )
|
|
||||||
ground_horizon_color = Color( 0.148289, 0.138067, 0.125119, 1 )
|
|
||||||
ground_curve = 0.25
|
|
||||||
sun_energy = 16.0
|
|
||||||
texture_size = 0
|
|
||||||
|
|
||||||
[sub_resource type="Environment" id=2]
|
|
||||||
background_mode = 2
|
|
||||||
background_sky = SubResource( 1 )
|
|
||||||
ssao_blur = 1
|
|
||||||
glow_levels/7 = true
|
|
||||||
glow_strength = 0.79
|
|
||||||
glow_bloom = 1.0
|
|
||||||
glow_blend_mode = 0
|
|
||||||
glow_bicubic_upscale = true
|
|
||||||
|
|
||||||
[sub_resource type="SpatialMaterial" id=3]
|
[sub_resource type="SpatialMaterial" id=3]
|
||||||
albedo_color = Color( 0.7, 0.7, 0.7, 1 )
|
albedo_color = Color( 0.7, 0.7, 0.7, 1 )
|
||||||
@@ -156,7 +136,7 @@ __meta__ = {
|
|||||||
mesh_library = ExtResource( 1 )
|
mesh_library = ExtResource( 1 )
|
||||||
cell_octant_size = 4
|
cell_octant_size = 4
|
||||||
data = {
|
data = {
|
||||||
"cells": PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, -536870912, 65533, 0, -536870912, 65534, 0, 0, 65535, 0, -536870912, 196603, 0, 0, 196604, 0, -536870912, 524292, 0, -536870912, 589820, 0, 0, 786432, 0, 0, 851967, 0, 0, 0, 1, -536870912, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 65530, 1, 0, 65531, 1, -536870912, 65532, 1, 0, 65533, 1, -536870912, 65534, 1, 0, 65535, 1, -536870912, 131075, 1, 0, 196603, 1, 0, 196604, 1, -536870912, 524292, 1, -536870912, 589820, 1, 0, 786432, 1, -536870912, 851967, 1, 0, 0, 2, 536870912, 1, 2, 0, 2, 2, 536870912, 3, 2, 0, 4, 2, -536870912, 65530, 2, -536870912, 65531, 2, 0, 65532, 2, 0, 65533, 2, 0, 65534, 2, 0, 65535, 2, 0, 131075, 2, 0, 196603, 2, 0, 196604, 2, 536870912, 524292, 2, 0, 589820, 2, 0, 786432, 2, 0, 786433, 2, 0, 851966, 2, 0, 851967, 2, 0, 0, 3, 0, 1, 3, 0, 2, 3, 0, 3, 3, 0, 4, 3, 0, 65530, 3, 0, 65531, 3, 0, 65532, 3, 0, 65533, 3, 0, 65534, 3, 0, 65535, 3, 0, 196603, 3, 0, 524291, 3, 0, 524292, 3, 0, 589820, 3, 0, 786432, 3, 0, 786433, 3, 0, 851966, 3, 0, 851967, 3, 0, 0, 4, 0, 1, 4, 0, 2, 4, 0, 3, 4, 0, 4, 4, 0, 65530, 4, 0, 65531, 4, 0, 65532, 4, 0, 65533, 4, 0, 65534, 4, 0, 65535, 4, 0, 196603, 4, 0, 786432, 4, 0, 851967, 4, 0, 0, 5, 0, 1, 5, 0, 2, 5, 0, 3, 5, 0, 4, 5, 1073741824, 65530, 5, 0, 65531, 5, 0, 65532, 5, 0, 65533, 5, 0, 65534, 5, 0, 65535, 5, 536870912, 131075, 5, 0, 0, 6, 0, 1, 6, 0, 2, 6, 0, 3, 6, 0, 4, 6, 0, 65530, 6, 536870912, 65531, 6, 0, 65532, 6, 0, 65533, 6, 0, 65534, 6, 0, 65535, 6, 1073741824, 131075, 6, 0, 196603, 6, 0, 0, 7, 0, 1, 7, 0, 2, 7, 0, 3, 7, -536870912, 4, 7, 0, 65530, 7, 0, 65531, 7, 0, 65532, 7, 0, 65533, 7, -536870912, 65534, 7, 0, 65535, 7, 0, 131075, 7, 1610612736, 196603, 7, 0, 0, 8, -536870912, 1, 8, 0, 2, 8, 0, 3, 8, 0, 4, 8, 0, 65530, 8, 0, 65531, 8, 0, 65532, 8, 536870912, 65533, 8, 0, 65534, 8, 0, 65535, 8, 0, 131075, 8, 0, 196603, 8, 0, 196604, 8, 0, 0, 9, 0, 1, 9, 536870912, 2, 9, 0, 3, 9, 0, 4, 9, 0, 65530, 9, 0, 65531, 9, 0, 65532, 9, -536870912, 65533, 9, 536870912, 65534, 9, 0, 65535, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 196603, 9, 0, 196604, 9, 0, 196605, 9, 0, 196608, 9, -536870912, 262142, 9, 0, 0, 10, -536870912, 1, 10, 0, 2, 10, 0, 3, 10, 0, 4, 10, 0, 65530, 10, 0, 65531, 10, 0, 65532, 10, 0, 65533, 10, 0, 65534, 10, -536870912, 65535, 10, 536870912, 0, 11, 0, 1, 11, 0, 2, 11, 0, 3, 11, 0, 4, 11, 0, 65530, 11, 0, 65531, 11, 0, 65532, 11, -536870912, 65533, 11, 0, 65534, 11, 1073741824, 65535, 11, 536870912, 0, 65532, 0, 1, 65532, 0, 2, 65532, 0, 3, 65532, 0, 4, 65532, 0, 65530, 65532, 0, 65531, 65532, 0, 65532, 65532, 0, 65533, 65532, 0, 65534, 65532, 0, 65535, 65532, 0, 0, 65533, 0, 1, 65533, 0, 2, 65533, 0, 3, 65533, 0, 4, 65533, 0, 65530, 65533, 0, 65531, 65533, 0, 65532, 65533, 0, 65533, 65533, 1073741824, 65534, 65533, 0, 65535, 65533, 0, 262145, 65533, 0, 262146, 65533, 0, 262147, 65533, 0, 589822, 65533, 0, 589823, 65533, 0, 655363, 65533, 536870912, 655364, 65533, 0, 720897, 65533, 0, 720898, 65533, 0, 786432, 65533, 0, 851967, 65533, 0, 0, 65534, 0, 1, 65534, 0, 2, 65534, 0, 3, 65534, 0, 4, 65534, 0, 65530, 65534, 0, 65531, 65534, -536870912, 65532, 65534, -536870912, 65533, 65534, 0, 65534, 65534, -536870912, 65535, 65534, -536870912, 65536, 65534, 0, 131071, 65534, 0, 196603, 65534, -536870912, 196604, 65534, 0, 196605, 65534, -536870912, 196606, 65534, -536870912, 196607, 65534, 0, 589822, 65534, -536870912, 589828, 65534, 0, 786432, 65534, 0, 851967, 65534, -536870912, 0, 65535, -536870912, 1, 65535, 0, 2, 65535, 0, 3, 65535, -536870912, 4, 65535, 0, 65530, 65535, -536870912, 65531, 65535, 0, 65532, 65535, 0, 65533, 65535, -536870912, 65534, 65535, -536870912, 65535, 65535, 0, 196603, 65535, -536870912, 196604, 65535, -536870912, 196611, 65535, 0, 589820, 65535, 0, 589821, 65535, -536870912, 589822, 65535, 0, 589828, 65535, -536870912, 786432, 65535, -536870912, 851967, 65535, 0 )
|
"cells": PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, -536870912, 65533, 0, 0, 65534, 0, 0, 65535, 0, -536870912, 196603, 0, -536870912, 196604, 0, -536870912, 524292, 0, 0, 589820, 0, -536870912, 786432, 0, -536870912, 851967, 0, 0, 0, 1, 0, 1, 1, -536870912, 2, 1, 0, 3, 1, 0, 4, 1, -536870912, 65530, 1, 0, 65531, 1, 0, 65532, 1, -536870912, 65533, 1, -536870912, 65534, 1, 0, 65535, 1, -536870912, 131075, 1, 0, 196603, 1, 0, 196604, 1, 0, 524292, 1, -536870912, 589820, 1, -536870912, 786432, 1, 0, 851967, 1, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0, 3, 2, -536870912, 4, 2, 0, 65530, 2, -536870912, 65531, 2, 0, 65532, 2, 0, 65533, 2, 0, 65534, 2, 536870912, 65535, 2, 0, 131075, 2, 0, 196603, 2, 0, 196604, 2, 0, 524292, 2, 0, 589820, 2, 0, 786432, 2, 0, 786433, 2, 1073741824, 851966, 2, 0, 851967, 2, 0, 0, 3, 0, 1, 3, 0, 2, 3, 0, 3, 3, 0, 4, 3, 0, 65530, 3, 0, 65531, 3, 0, 65532, 3, 0, 65533, 3, 0, 65534, 3, 0, 65535, 3, 0, 196603, 3, 0, 524291, 3, 0, 524292, 3, 0, 589820, 3, 0, 786432, 3, 0, 786433, 3, 0, 851966, 3, 0, 851967, 3, 0, 0, 4, 0, 1, 4, -536870912, 2, 4, 536870912, 3, 4, 0, 4, 4, 0, 65530, 4, 536870912, 65531, 4, 0, 65532, 4, 0, 65533, 4, -536870912, 65534, 4, 0, 65535, 4, 0, 196603, 4, 0, 786432, 4, 0, 851967, 4, 0, 0, 5, 0, 1, 5, 0, 2, 5, -536870912, 3, 5, 0, 4, 5, 0, 65530, 5, 0, 65531, 5, 0, 65532, 5, 536870912, 65533, 5, 0, 65534, 5, 536870912, 65535, 5, 0, 131075, 5, 0, 0, 6, 0, 1, 6, 0, 2, 6, 0, 3, 6, 0, 4, 6, 0, 65530, 6, 0, 65531, 6, 536870912, 65532, 6, 0, 65533, 6, 0, 65534, 6, 0, 65535, 6, 0, 131075, 6, 0, 196603, 6, 0, 0, 7, 0, 1, 7, 0, 2, 7, 0, 3, 7, 0, 4, 7, 0, 65530, 7, 0, 65531, 7, -536870912, 65532, 7, 0, 65533, 7, 0, 65534, 7, 0, 65535, 7, 0, 131075, 7, 0, 196603, 7, -536870912, 0, 8, 1073741824, 1, 8, 0, 2, 8, 0, 3, 8, 0, 4, 8, 0, 65530, 8, 0, 65531, 8, 0, 65532, 8, 0, 65533, 8, 0, 65534, 8, 0, 65535, 8, 536870912, 131075, 8, 0, 196603, 8, 0, 196604, 8, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 536870912, 65530, 9, 1073741824, 65531, 9, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 196603, 9, 0, 196604, 9, 0, 196605, 9, 0, 196608, 9, 0, 262142, 9, 0, 0, 10, 0, 1, 10, 0, 2, 10, 0, 3, 10, 0, 4, 10, 0, 65530, 10, 0, 65531, 10, 0, 65532, 10, 0, 65533, 10, 0, 65534, 10, 0, 65535, 10, 0, 0, 11, 0, 1, 11, 0, 2, 11, 0, 3, 11, 0, 4, 11, 0, 65530, 11, -536870912, 65531, 11, 0, 65532, 11, 0, 65533, 11, 0, 65534, 11, 0, 65535, 11, 0, 0, 65532, 0, 1, 65532, 0, 2, 65532, 0, 3, 65532, 0, 4, 65532, 0, 65530, 65532, 0, 65531, 65532, 0, 65532, 65532, -536870912, 65533, 65532, 0, 65534, 65532, 0, 65535, 65532, 536870912, 0, 65533, 536870912, 1, 65533, -536870912, 2, 65533, 0, 3, 65533, 0, 4, 65533, -536870912, 65530, 65533, 0, 65531, 65533, -536870912, 65532, 65533, 0, 65533, 65533, -536870912, 65534, 65533, -536870912, 65535, 65533, 0, 262145, 65533, -536870912, 262146, 65533, 0, 262147, 65533, 0, 589822, 65533, 0, 589823, 65533, 0, 655363, 65533, 0, 655364, 65533, 0, 720897, 65533, -536870912, 720898, 65533, 0, 786432, 65533, -536870912, 851967, 65533, 0, 0, 65534, -536870912, 1, 65534, 0, 2, 65534, -536870912, 3, 65534, -536870912, 4, 65534, -536870912, 65530, 65534, 0, 65531, 65534, 0, 65532, 65534, -536870912, 65533, 65534, 0, 65534, 65534, -536870912, 65535, 65534, -536870912, 65536, 65534, 0, 131071, 65534, -536870912, 196603, 65534, -536870912, 196604, 65534, 0, 196605, 65534, -536870912, 196606, 65534, -536870912, 196607, 65534, 0, 589822, 65534, -536870912, 589828, 65534, -536870912, 786432, 65534, 0, 851967, 65534, -536870912, 0, 65535, -536870912, 1, 65535, 0, 2, 65535, -536870912, 3, 65535, -536870912, 4, 65535, 0, 65530, 65535, -536870912, 65531, 65535, -536870912, 65532, 65535, 0, 65533, 65535, 0, 65534, 65535, -536870912, 65535, 65535, 0, 196603, 65535, -536870912, 196604, 65535, -536870912, 196611, 65535, 0, 589820, 65535, -536870912, 589821, 65535, -536870912, 589822, 65535, 0, 589828, 65535, -536870912, 786432, 65535, -536870912, 851967, 65535, 0 )
|
||||||
}
|
}
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_clip_": 0,
|
"_editor_clip_": 0,
|
||||||
@@ -164,14 +144,14 @@ __meta__ = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="DirectionalLight" type="DirectionalLight" parent="."]
|
[node name="DirectionalLight" type="DirectionalLight" parent="."]
|
||||||
transform = Transform( 0.835501, 0.057148, -0.54651, 0.54949, -0.0868937, 0.83097, 0, -0.994577, -0.104002, 0, 10.2259, 0 )
|
transform = Transform( -0.173649, 0.806707, -0.564863, 0, 0.573576, 0.819152, 0.984808, 0.142244, -0.0996007, 0, 0, 0 )
|
||||||
light_energy = 1.3
|
light_energy = 1.3
|
||||||
shadow_enabled = true
|
shadow_enabled = true
|
||||||
shadow_bias = 1.0
|
shadow_bias = 1.0
|
||||||
directional_shadow_normal_bias = 0.2
|
directional_shadow_normal_bias = 0.2
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
environment = SubResource( 2 )
|
environment = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="Cubio" parent="." instance=ExtResource( 2 )]
|
[node name="Cubio" parent="." instance=ExtResource( 2 )]
|
||||||
|
|
||||||
|
|||||||
@@ -85,3 +85,4 @@ shadow_filter=3
|
|||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
quality/filters/msaa=2
|
quality/filters/msaa=2
|
||||||
|
environment/default_environment="res://default_env.tres"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ surfaces/0 = {
|
|||||||
[sub_resource type="ConvexPolygonShape" id=3]
|
[sub_resource type="ConvexPolygonShape" id=3]
|
||||||
points = PoolVector3Array( 0.946777, 0.946777, -0.999512, 0.946777, -0.946777, -0.999512, -0.946777, -0.946777, -1, -0.946777, 0.946777, -1, 0.946777, -0.946777, 1, 0.946777, 0.946777, 1, -0.946777, 0.946777, 0.999512, -0.946777, -0.946777, 0.999512, -1, -0.946777, 0.946777, -1, 0.946777, 0.946777, -0.999512, 0.946777, -0.946777, -0.999512, -0.946777, -0.946777, 0.946777, 1, -0.946777, -0.946777, 1, -0.946777, -0.946777, 1, 0.946777, 0.946777, 1, 0.946777, 1, -0.946777, -0.946777, 1, 0.946777, -0.946777, 0.999512, 0.946777, 0.946777, 1, -0.946777, 0.946777, 0.946777, -0.946777, -0.999512, 1, -0.946777, -0.946777, 0.946777, -1, -0.946777, 0.946777, -1, 0.946777, 1, -0.946777, 0.946777, 0.946777, -0.946777, 1, -0.946777, -1, 0.946777, -0.946777, -0.946777, 0.999512, -1, -0.946777, 0.946777, -0.999512, -0.946777, -0.946777, -0.946777, -0.946777, -1, -0.946777, -1, -0.946777, 1, 0.946777, -0.946777, 0.946777, 0.946777, -0.999512, 0.946777, 1, -0.946777, 0.946777, 1, 0.946777, 0.946777, 0.946777, 1, 0.999512, 0.946777, 0.946777, -1, 0.946777, 0.946777, -0.946777, 0.946777, 0.999512, -0.946777, 0.946777, -1, -0.999512, 0.946777, -0.946777, -0.946777, 1, -0.946777, 1, -0.946777, -0.946777, 1, -0.946777, 0.946777, 0.946777, -1, 0.946777, 0.946777, -1, -0.946777, 0.946777, -0.946777, -0.999512, 0.946777, -1, -0.946777, 1, 0.946777, -0.946777, 1, -0.946777, -0.946777, 0.999512, 0.946777, 0.946777, 0.946777, 0.946777, 1, 0.946777, -0.946777, 1, -0.946777, -1, -0.946777, -0.946777, -1, 0.946777, -1, 0.946777, 0.946777, -1, -0.946777, 0.946777, -0.999512, -0.946777, -0.946777, -0.999512, 0.946777, -0.946777, 0.999512, 0.946777, 0.946777, 1, 0.946777, -0.946777, 0.946777, 0.946777, -0.999512, -0.946777, 0.946777, -1, 0.946777, 0.946777, 1 )
|
points = PoolVector3Array( 0.946777, 0.946777, -0.999512, 0.946777, -0.946777, -0.999512, -0.946777, -0.946777, -1, -0.946777, 0.946777, -1, 0.946777, -0.946777, 1, 0.946777, 0.946777, 1, -0.946777, 0.946777, 0.999512, -0.946777, -0.946777, 0.999512, -1, -0.946777, 0.946777, -1, 0.946777, 0.946777, -0.999512, 0.946777, -0.946777, -0.999512, -0.946777, -0.946777, 0.946777, 1, -0.946777, -0.946777, 1, -0.946777, -0.946777, 1, 0.946777, 0.946777, 1, 0.946777, 1, -0.946777, -0.946777, 1, 0.946777, -0.946777, 0.999512, 0.946777, 0.946777, 1, -0.946777, 0.946777, 0.946777, -0.946777, -0.999512, 1, -0.946777, -0.946777, 0.946777, -1, -0.946777, 0.946777, -1, 0.946777, 1, -0.946777, 0.946777, 0.946777, -0.946777, 1, -0.946777, -1, 0.946777, -0.946777, -0.946777, 0.999512, -1, -0.946777, 0.946777, -0.999512, -0.946777, -0.946777, -0.946777, -0.946777, -1, -0.946777, -1, -0.946777, 1, 0.946777, -0.946777, 0.946777, 0.946777, -0.999512, 0.946777, 1, -0.946777, 0.946777, 1, 0.946777, 0.946777, 0.946777, 1, 0.999512, 0.946777, 0.946777, -1, 0.946777, 0.946777, -0.946777, 0.946777, 0.999512, -0.946777, 0.946777, -1, -0.999512, 0.946777, -0.946777, -0.946777, 1, -0.946777, 1, -0.946777, -0.946777, 1, -0.946777, 0.946777, 0.946777, -1, 0.946777, 0.946777, -1, -0.946777, 0.946777, -0.946777, -0.999512, 0.946777, -1, -0.946777, 1, 0.946777, -0.946777, 1, -0.946777, -0.946777, 0.999512, 0.946777, 0.946777, 0.946777, 0.946777, 1, 0.946777, -0.946777, 1, -0.946777, -1, -0.946777, -0.946777, -1, 0.946777, -1, 0.946777, 0.946777, -1, -0.946777, 0.946777, -0.999512, -0.946777, -0.946777, -0.999512, 0.946777, -0.946777, 0.999512, 0.946777, 0.946777, 1, 0.946777, -0.946777, 0.946777, 0.946777, -0.999512, -0.946777, 0.946777, -1, 0.946777, 0.946777, 1 )
|
||||||
|
|
||||||
[node name="Spatial" type="Spatial"]
|
[node name="PurpleCube" type="Spatial"]
|
||||||
_import_path = NodePath(".")
|
_import_path = NodePath(".")
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"__editor_plugin_screen__": "3D"
|
"__editor_plugin_screen__": "3D"
|
||||||
9
3d/navmesh/default_env.tres
Normal file
9
3d/navmesh/default_env.tres
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="Environment" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSky" id=1]
|
||||||
|
ground_horizon_color = Color( 0.156863, 0.184314, 0.211765, 1 )
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
background_mode = 2
|
||||||
|
background_sky = SubResource( 1 )
|
||||||
|
ssao_blur = 1
|
||||||
File diff suppressed because one or more lines are too long
@@ -26,3 +26,7 @@ config/icon="res://icon.png"
|
|||||||
[gdnative]
|
[gdnative]
|
||||||
|
|
||||||
singletons=[ ]
|
singletons=[ ]
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
quality/driver/driver_name="GLES2"
|
||||||
|
|||||||
@@ -157,5 +157,5 @@ common/physics_fps=120
|
|||||||
quality/driver/driver_name="GLES2"
|
quality/driver/driver_name="GLES2"
|
||||||
vram_compression/import_etc=true
|
vram_compression/import_etc=true
|
||||||
vram_compression/import_etc2=false
|
vram_compression/import_etc2=false
|
||||||
gles2/debug/disable_half_float=true
|
|
||||||
environment/default_environment="res://default_env.tres"
|
environment/default_environment="res://default_env.tres"
|
||||||
|
gles2/debug/disable_half_float=true
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,9 +13,9 @@ func goto_scene(path):
|
|||||||
|
|
||||||
# The way around this is deferring the load to a later time, when
|
# The way around this is deferring the load to a later time, when
|
||||||
# it is ensured that no code from the current scene is running:
|
# it is ensured that no code from the current scene is running:
|
||||||
|
|
||||||
call_deferred("_deferred_goto_scene", path)
|
call_deferred("_deferred_goto_scene", path)
|
||||||
|
|
||||||
|
|
||||||
func _deferred_goto_scene(path):
|
func _deferred_goto_scene(path):
|
||||||
# Immediately free the current scene, there is no risk here.
|
# Immediately free the current scene, there is no risk here.
|
||||||
get_tree().get_current_scene().free()
|
get_tree().get_current_scene().free()
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ anchor_bottom = 1.0
|
|||||||
size_flags_horizontal = 2
|
size_flags_horizontal = 2
|
||||||
size_flags_vertical = 2
|
size_flags_vertical = 2
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
margin_left = 64.0
|
margin_left = 64.0
|
||||||
|
|||||||
@@ -13,17 +13,28 @@ func _ready():
|
|||||||
label.text += "\n\n\nTest item SKU: %s" % TEST_ITEM_SKU
|
label.text += "\n\n\nTest item SKU: %s" % TEST_ITEM_SKU
|
||||||
|
|
||||||
payment = Engine.get_singleton("GodotGooglePlayBilling")
|
payment = Engine.get_singleton("GodotGooglePlayBilling")
|
||||||
payment.connect("connected", self, "_on_connected") # No params
|
# No params.
|
||||||
payment.connect("disconnected", self, "_on_disconnected") # No params
|
payment.connect("connected", self, "_on_connected")
|
||||||
payment.connect("connect_error", self, "_on_connect_error") # Response ID (int), Debug message (string)
|
# No params.
|
||||||
payment.connect("purchases_updated", self, "_on_purchases_updated") # Purchases (Dictionary[])
|
payment.connect("disconnected", self, "_on_disconnected")
|
||||||
payment.connect("purchase_error", self, "_on_purchase_error") # Response ID (int), Debug message (string)
|
# Response ID (int), Debug message (string).
|
||||||
payment.connect("sku_details_query_completed", self, "_on_sku_details_query_completed") # SKUs (Dictionary[])
|
payment.connect("connect_error", self, "_on_connect_error")
|
||||||
payment.connect("sku_details_query_error", self, "_on_sku_details_query_error") # Response ID (int), Debug message (string), Queried SKUs (string[])
|
# Purchases (Dictionary[]).
|
||||||
payment.connect("purchase_acknowledged", self, "_on_purchase_acknowledged") # Purchase token (string)
|
payment.connect("purchases_updated", self, "_on_purchases_updated")
|
||||||
payment.connect("purchase_acknowledgement_error", self, "_on_purchase_acknowledgement_error") # Response ID (int), Debug message (string), Purchase token (string)
|
# Response ID (int), Debug message (string).
|
||||||
payment.connect("purchase_consumed", self, "_on_purchase_consumed") # Purchase token (string)
|
payment.connect("purchase_error", self, "_on_purchase_error")
|
||||||
payment.connect("purchase_consumption_error", self, "_on_purchase_consumption_error") # Response ID (int), Debug message (string), Purchase token (string)
|
# SKUs (Dictionary[]).
|
||||||
|
payment.connect("sku_details_query_completed", self, "_on_sku_details_query_completed")
|
||||||
|
# Response ID (int), Debug message (string), Queried SKUs (string[]).
|
||||||
|
payment.connect("sku_details_query_error", self, "_on_sku_details_query_error")
|
||||||
|
# Purchase token (string).
|
||||||
|
payment.connect("purchase_acknowledged", self, "_on_purchase_acknowledged")
|
||||||
|
# Response ID (int), Debug message (string), Purchase token (string).
|
||||||
|
payment.connect("purchase_acknowledgement_error", self, "_on_purchase_acknowledgement_error")
|
||||||
|
# Purchase token (string).
|
||||||
|
payment.connect("purchase_consumed", self, "_on_purchase_consumed")
|
||||||
|
# Response ID (int), Debug message (string), Purchase token (string).
|
||||||
|
payment.connect("purchase_consumption_error", self, "_on_purchase_consumption_error")
|
||||||
payment.startConnection()
|
payment.startConnection()
|
||||||
else:
|
else:
|
||||||
show_alert("Android IAP support is not enabled. Make sure you have enabled 'Custom Build' and installed and enabled the GodotGooglePlayBilling plugin in your Android export settings! This application will not work.")
|
show_alert("Android IAP support is not enabled. Make sure you have enabled 'Custom Build' and installed and enabled the GodotGooglePlayBilling plugin in your Android export settings! This application will not work.")
|
||||||
@@ -39,8 +50,7 @@ func _on_connected():
|
|||||||
|
|
||||||
# We must acknowledge all puchases.
|
# We must acknowledge all puchases.
|
||||||
# See https://developer.android.com/google/play/billing/integrate#process for more information
|
# See https://developer.android.com/google/play/billing/integrate#process for more information
|
||||||
var query = payment.queryPurchases("inapp") # Use "subs" for subscriptions
|
var query = payment.queryPurchases("inapp") # Use "subs" for subscriptions.
|
||||||
var purchase_token = null
|
|
||||||
if query.status == OK:
|
if query.status == OK:
|
||||||
for purchase in query.purchases:
|
for purchase in query.purchases:
|
||||||
if !purchase.is_acknowledged:
|
if !purchase.is_acknowledged:
|
||||||
@@ -100,7 +110,7 @@ func _on_disconnected():
|
|||||||
|
|
||||||
# GUI
|
# GUI
|
||||||
func _on_QuerySkuDetailsButton_pressed():
|
func _on_QuerySkuDetailsButton_pressed():
|
||||||
payment.querySkuDetails([TEST_ITEM_SKU], "inapp") # Use "subs" for subscriptions
|
payment.querySkuDetails([TEST_ITEM_SKU], "inapp") # Use "subs" for subscriptions.
|
||||||
|
|
||||||
|
|
||||||
func _on_PurchaseButton_pressed():
|
func _on_PurchaseButton_pressed():
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
extends Spatial
|
extends Spatial
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
# Get the viewport and clear it.
|
# Clear the viewport.
|
||||||
var viewport = get_node("Viewport")
|
var viewport = $Viewport
|
||||||
viewport.set_clear_mode(Viewport.CLEAR_MODE_ONLY_NEXT_FRAME)
|
$Viewport.set_clear_mode(Viewport.CLEAR_MODE_ONLY_NEXT_FRAME)
|
||||||
|
|
||||||
# Let two frames pass to make sure the vieport is captured.
|
# Let two frames pass to make sure the vieport is captured.
|
||||||
yield(get_tree(), "idle_frame")
|
yield(get_tree(), "idle_frame")
|
||||||
yield(get_tree(), "idle_frame")
|
yield(get_tree(), "idle_frame")
|
||||||
|
|
||||||
# Retrieve the texture and set it to the viewport quad.
|
# Retrieve the texture and set it to the viewport quad.
|
||||||
get_node("Viewport_quad").material_override.albedo_texture = viewport.get_texture()
|
$ViewportQuad.material_override.albedo_texture = viewport.get_texture()
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ script = SubResource( 9 )
|
|||||||
|
|
||||||
[sub_resource type="SpatialMaterial" id=11]
|
[sub_resource type="SpatialMaterial" id=11]
|
||||||
|
|
||||||
[node name="2D_in_3D" type="Spatial"]
|
[node name="2Din3D" type="Spatial"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Camera" type="Camera" parent="."]
|
[node name="Camera" type="Camera" parent="."]
|
||||||
@@ -52,20 +52,20 @@ transform = Transform( 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, -1, -2 )
|
|||||||
mesh = SubResource( 1 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = SubResource( 3 )
|
material/0 = SubResource( 3 )
|
||||||
|
|
||||||
[node name="Pillar" type="Spatial" parent="."]
|
[node name="Pillar1" type="Spatial" parent="."]
|
||||||
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, -3, -0.2, -4 )
|
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, -3, -0.2, -4 )
|
||||||
|
|
||||||
[node name="Pillar_bottom" type="MeshInstance" parent="Pillar"]
|
[node name="PillarBottom" type="MeshInstance" parent="Pillar1"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0 )
|
||||||
mesh = SubResource( 7 )
|
mesh = SubResource( 7 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Pillar_top" type="MeshInstance" parent="Pillar"]
|
[node name="PillarTop" type="MeshInstance" parent="Pillar1"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0 )
|
||||||
mesh = SubResource( 7 )
|
mesh = SubResource( 7 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Pillar_middle" type="MeshInstance" parent="Pillar"]
|
[node name="PillarMiddle" type="MeshInstance" parent="Pillar1"]
|
||||||
transform = Transform( 0.7, 0, 0, 0, 2, 0, 0, 0, 0.7, 0, 2.5, 0 )
|
transform = Transform( 0.7, 0, 0, 0, 2, 0, 0, 0, 0.7, 0, 2.5, 0 )
|
||||||
mesh = SubResource( 7 )
|
mesh = SubResource( 7 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
@@ -73,22 +73,22 @@ material/0 = SubResource( 8 )
|
|||||||
[node name="Pillar2" type="Spatial" parent="."]
|
[node name="Pillar2" type="Spatial" parent="."]
|
||||||
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 3, -0.2, -4 )
|
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 3, -0.2, -4 )
|
||||||
|
|
||||||
[node name="Pillar_bottom" type="MeshInstance" parent="Pillar2"]
|
[node name="PillarBottom" type="MeshInstance" parent="Pillar2"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0 )
|
||||||
mesh = SubResource( 7 )
|
mesh = SubResource( 7 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Pillar_top" type="MeshInstance" parent="Pillar2"]
|
[node name="PillarTop" type="MeshInstance" parent="Pillar2"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0 )
|
||||||
mesh = SubResource( 7 )
|
mesh = SubResource( 7 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Pillar_middle" type="MeshInstance" parent="Pillar2"]
|
[node name="PillarMiddle" type="MeshInstance" parent="Pillar2"]
|
||||||
transform = Transform( 0.7, 0, 0, 0, 2, 0, 0, 0, 0.7, 0, 2.5, 0 )
|
transform = Transform( 0.7, 0, 0, 0, 2, 0, 0, 0, 0.7, 0, 2.5, 0 )
|
||||||
mesh = SubResource( 7 )
|
mesh = SubResource( 7 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Pillar_back" type="MeshInstance" parent="."]
|
[node name="PillarBack" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 1.2, -4.5 )
|
transform = Transform( 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 1.2, -4.5 )
|
||||||
mesh = SubResource( 10 )
|
mesh = SubResource( 10 )
|
||||||
material/0 = SubResource( 8 )
|
material/0 = SubResource( 8 )
|
||||||
@@ -99,7 +99,7 @@ shadow_enabled = true
|
|||||||
directional_shadow_blend_splits = true
|
directional_shadow_blend_splits = true
|
||||||
directional_shadow_normal_bias = 0.2
|
directional_shadow_normal_bias = 0.2
|
||||||
|
|
||||||
[node name="Viewport_quad" type="MeshInstance" parent="."]
|
[node name="ViewportQuad" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 2, 0, 0, 0, 0, -1.333, 0, 1, 0, 0, 1.2, -4.25 )
|
transform = Transform( 2, 0, 0, 0, 0, -1.333, 0, 1, 0, 0, 1.2, -4.25 )
|
||||||
material_override = SubResource( 11 )
|
material_override = SubResource( 11 )
|
||||||
mesh = SubResource( 1 )
|
mesh = SubResource( 1 )
|
||||||
@@ -111,25 +111,25 @@ hdr = false
|
|||||||
usage = 0
|
usage = 0
|
||||||
render_target_v_flip = true
|
render_target_v_flip = true
|
||||||
|
|
||||||
[node name="2D_World" type="Node2D" parent="Viewport"]
|
[node name="Pong" type="Node2D" parent="Viewport"]
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="BG" type="Panel" parent="Viewport/2D_World"]
|
[node name="Background" type="Panel" parent="Viewport/Pong"]
|
||||||
margin_right = 600.0
|
margin_right = 600.0
|
||||||
margin_bottom = 400.0
|
margin_bottom = 400.0
|
||||||
|
|
||||||
[node name="ball" type="Sprite" parent="Viewport/2D_World"]
|
[node name="Ball" type="Sprite" parent="Viewport/Pong"]
|
||||||
position = Vector2( 300, 200 )
|
position = Vector2( 300, 200 )
|
||||||
texture = ExtResource( 3 )
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="left" type="Sprite" parent="Viewport/2D_World"]
|
[node name="LeftPaddle" type="Sprite" parent="Viewport/Pong"]
|
||||||
position = Vector2( 20, 200 )
|
position = Vector2( 20, 200 )
|
||||||
texture = ExtResource( 4 )
|
texture = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="right" type="Sprite" parent="Viewport/2D_World"]
|
[node name="RightPaddle" type="Sprite" parent="Viewport/Pong"]
|
||||||
position = Vector2( 580, 200 )
|
position = Vector2( 580, 200 )
|
||||||
texture = ExtResource( 5 )
|
texture = ExtResource( 5 )
|
||||||
|
|
||||||
[node name="separator" type="Sprite" parent="Viewport/2D_World"]
|
[node name="Separator" type="Sprite" parent="Viewport/Pong"]
|
||||||
position = Vector2( 298, 200 )
|
position = Vector2( 298, 200 )
|
||||||
texture = ExtResource( 6 )
|
texture = ExtResource( 6 )
|
||||||
|
|||||||
@@ -5,20 +5,25 @@ const INITIAL_BALL_SPEED = 80
|
|||||||
|
|
||||||
var ball_speed = INITIAL_BALL_SPEED
|
var ball_speed = INITIAL_BALL_SPEED
|
||||||
var screen_size = Vector2(640, 400)
|
var screen_size = Vector2(640, 400)
|
||||||
|
|
||||||
# Default ball direction.
|
# Default ball direction.
|
||||||
var direction = Vector2(-1, 0)
|
var direction = Vector2.LEFT
|
||||||
var pad_size = Vector2(8, 32)
|
var pad_size = Vector2(8, 32)
|
||||||
|
|
||||||
|
onready var ball = $Ball
|
||||||
|
onready var left_paddle = $LeftPaddle
|
||||||
|
onready var right_paddle = $RightPaddle
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
screen_size = get_viewport_rect().size # Get actual size.
|
screen_size = get_viewport_rect().size # Get actual size.
|
||||||
pad_size = get_node("left").get_texture().get_size()
|
pad_size = left_paddle.get_texture().get_size()
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
# Get ball position and pad rectangles.
|
# Get ball position and pad rectangles.
|
||||||
var ball_pos = get_node("ball").get_position()
|
var ball_pos = ball.get_position()
|
||||||
var left_rect = Rect2(get_node("left").get_position() - pad_size * 0.5, pad_size)
|
var left_rect = Rect2(left_paddle.get_position() - pad_size * 0.5, pad_size)
|
||||||
var right_rect = Rect2(get_node("right").get_position() - pad_size * 0.5, pad_size)
|
var right_rect = Rect2(right_paddle.get_position() - pad_size * 0.5, pad_size)
|
||||||
|
|
||||||
# Integrate new ball postion.
|
# Integrate new ball postion.
|
||||||
ball_pos += direction * ball_speed * delta
|
ball_pos += direction * ball_speed * delta
|
||||||
@@ -40,23 +45,23 @@ func _process(delta):
|
|||||||
ball_speed = INITIAL_BALL_SPEED
|
ball_speed = INITIAL_BALL_SPEED
|
||||||
direction = Vector2(-1, 0)
|
direction = Vector2(-1, 0)
|
||||||
|
|
||||||
get_node("ball").set_position(ball_pos)
|
ball.set_position(ball_pos)
|
||||||
|
|
||||||
# Move left pad.
|
# Move left pad.
|
||||||
var left_pos = get_node("left").get_position()
|
var left_pos = left_paddle.get_position()
|
||||||
|
|
||||||
if left_pos.y > 0 and Input.is_action_pressed("left_move_up"):
|
if left_pos.y > 0 and Input.is_action_pressed("left_move_up"):
|
||||||
left_pos.y += -PAD_SPEED * delta
|
left_pos.y += -PAD_SPEED * delta
|
||||||
if left_pos.y < screen_size.y and Input.is_action_pressed("left_move_down"):
|
if left_pos.y < screen_size.y and Input.is_action_pressed("left_move_down"):
|
||||||
left_pos.y += PAD_SPEED * delta
|
left_pos.y += PAD_SPEED * delta
|
||||||
|
|
||||||
get_node("left").set_position(left_pos)
|
left_paddle.set_position(left_pos)
|
||||||
|
|
||||||
# Move right pad.
|
# Move right pad.
|
||||||
var right_pos = get_node("right").get_position()
|
var right_pos = right_paddle.get_position()
|
||||||
if right_pos.y > 0 and Input.is_action_pressed("right_move_up"):
|
if right_pos.y > 0 and Input.is_action_pressed("right_move_up"):
|
||||||
right_pos.y += -PAD_SPEED * delta
|
right_pos.y += -PAD_SPEED * delta
|
||||||
if right_pos.y < screen_size.y and Input.is_action_pressed("right_move_down"):
|
if right_pos.y < screen_size.y and Input.is_action_pressed("right_move_down"):
|
||||||
right_pos.y += PAD_SPEED * delta
|
right_pos.y += PAD_SPEED * delta
|
||||||
|
|
||||||
get_node("right").set_position(right_pos)
|
right_paddle.set_position(right_pos)
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
[sub_resource type="CubeMesh" id=1]
|
[sub_resource type="CubeMesh" id=1]
|
||||||
|
|
||||||
[node name="Spatial" type="Spatial"]
|
[node name="Cubes" type="Spatial"]
|
||||||
|
|
||||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
[node name="MeshInstance1" type="MeshInstance" parent="."]
|
||||||
mesh = SubResource( 1 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, -1 )
|
|||||||
mesh = SubResource( 1 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="Camera" type="Camera" parent="."]
|
[node name="Camera3D" type="Camera" parent="."]
|
||||||
transform = Transform( 0.877582, 0.229849, -0.420736, 0, 0.877582, 0.479426, 0.479426, -0.420736, 0.770151, -1.68294, 2.25571, 3.0806 )
|
transform = Transform( 0.877582, 0.229849, -0.420736, 0, 0.877582, 0.479426, 0.479426, -0.420736, 0.770151, -1.68294, 2.25571, 3.0806 )
|
||||||
fov = 74.0
|
fov = 74.0
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_scene load_steps=7 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://noto_sans_ui_regular.ttf" type="DynamicFontData" id=1]
|
[ext_resource path="res://noto_sans_ui_regular.ttf" type="DynamicFontData" id=1]
|
||||||
[ext_resource path="res://spatial.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://cubes.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://hud.gd" type="Script" id=3]
|
[ext_resource path="res://hud.gd" type="Script" id=3]
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=1]
|
[sub_resource type="DynamicFont" id=1]
|
||||||
@@ -30,7 +30,7 @@ usage = 3
|
|||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
shadow_atlas_size = 4096
|
shadow_atlas_size = 4096
|
||||||
|
|
||||||
[node name="Spatial" parent="Viewport" instance=ExtResource( 2 )]
|
[node name="Cubes" parent="Viewport" instance=ExtResource( 2 )]
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
[node name="TextureRect" type="TextureRect" parent="."]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
extends Spatial
|
extends Spatial
|
||||||
|
|
||||||
# Handle the motion of both players' camera as well as communication with the
|
# Handle the motion of both player cameras as well as communication with the
|
||||||
# SplitScreen shader to achieve the dynamic split screen effet
|
# SplitScreen shader to achieve the dynamic split screen effet
|
||||||
#
|
#
|
||||||
# Cameras are place on the segment joining the two players, either in the middle
|
# Cameras are place on the segment joining the two players, either in the middle
|
||||||
@@ -24,11 +24,13 @@ export(float) var split_line_thickness = 3.0
|
|||||||
export(Color, RGBA) var split_line_color = Color.black
|
export(Color, RGBA) var split_line_color = Color.black
|
||||||
export(bool) var adaptive_split_line_thickness = true
|
export(bool) var adaptive_split_line_thickness = true
|
||||||
|
|
||||||
onready var player1 = $'../Player1'
|
onready var player1 = $"../Player1"
|
||||||
onready var player2 = $'../Player2'
|
onready var player2 = $"../Player2"
|
||||||
onready var camera1: Camera = $'Viewport1/Camera1'
|
onready var view = $View
|
||||||
onready var camera2: Camera = $'Viewport2/Camera2'
|
onready var viewport1 = $Viewport1
|
||||||
onready var view: TextureRect = $'View'
|
onready var viewport2 = $Viewport2
|
||||||
|
onready var camera1 = viewport1.get_node(@"Camera1")
|
||||||
|
onready var camera2 = viewport2.get_node(@"Camera2")
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
@@ -37,8 +39,8 @@ func _ready():
|
|||||||
|
|
||||||
get_viewport().connect("size_changed", self, "_on_size_changed")
|
get_viewport().connect("size_changed", self, "_on_size_changed")
|
||||||
|
|
||||||
view.material.set_shader_param('viewport1', $Viewport1.get_texture())
|
view.material.set_shader_param("viewport1", viewport1.get_texture())
|
||||||
view.material.set_shader_param('viewport2', $Viewport2.get_texture())
|
view.material.set_shader_param("viewport2", viewport2.get_texture())
|
||||||
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
@@ -74,11 +76,11 @@ func _update_splitscreen():
|
|||||||
else:
|
else:
|
||||||
thickness = split_line_thickness
|
thickness = split_line_thickness
|
||||||
|
|
||||||
view.material.set_shader_param('split_active', _get_split_state())
|
view.material.set_shader_param("split_active", _get_split_state())
|
||||||
view.material.set_shader_param('player1_position', player1_position)
|
view.material.set_shader_param("player1_position", player1_position)
|
||||||
view.material.set_shader_param('player2_position', player2_position)
|
view.material.set_shader_param("player2_position", player2_position)
|
||||||
view.material.set_shader_param('split_line_thickness', thickness)
|
view.material.set_shader_param("split_line_thickness", thickness)
|
||||||
view.material.set_shader_param('split_line_color', split_line_color)
|
view.material.set_shader_param("split_line_color", split_line_color)
|
||||||
|
|
||||||
|
|
||||||
# Split screen is active if players are too far apart from each other.
|
# Split screen is active if players are too far apart from each other.
|
||||||
@@ -94,9 +96,8 @@ func _on_size_changed():
|
|||||||
|
|
||||||
$Viewport1.size = screen_size
|
$Viewport1.size = screen_size
|
||||||
$Viewport2.size = screen_size
|
$Viewport2.size = screen_size
|
||||||
view.rect_size = screen_size
|
|
||||||
|
|
||||||
view.material.set_shader_param('viewport_size', screen_size)
|
view.material.set_shader_param("viewport_size", screen_size)
|
||||||
|
|
||||||
|
|
||||||
func _compute_position_difference_in_world():
|
func _compute_position_difference_in_world():
|
||||||
@@ -18,7 +18,7 @@ _global_script_class_icons={
|
|||||||
config/name="Dynamic Split Screen"
|
config/name="Dynamic Split Screen"
|
||||||
config/description="This sample project showcases an implementation of dynamic
|
config/description="This sample project showcases an implementation of dynamic
|
||||||
split screen, also called Voronoi split screen, using GDSL."
|
split screen, also called Voronoi split screen, using GDSL."
|
||||||
run/main_scene="res://SplitScreen.tscn"
|
run/main_scene="res://split_screen.tscn"
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ void fragment() {
|
|||||||
|
|
||||||
if (dx.y != 0.0) {
|
if (dx.y != 0.0) {
|
||||||
split_slope = dx.x / dx.y;
|
split_slope = dx.x / dx.y;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
split_slope = 100000.0; // High value (vertical split) if dx.y = 0
|
split_slope = 100000.0; // High value (vertical split) if dx.y = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,8 +43,7 @@ void fragment() {
|
|||||||
// Draw split border if close enough
|
// Draw split border if close enough
|
||||||
if (distance_to_split_line < split_line_thickness) {
|
if (distance_to_split_line < split_line_thickness) {
|
||||||
COLOR = split_line_color;
|
COLOR = split_line_color;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
float split_current_y = (split_origin.x - UV.x) * split_slope + split_origin.y;
|
float split_current_y = (split_origin.x - UV.x) * split_slope + split_origin.y;
|
||||||
float split_player1_position_y = (split_origin.x - player1_position.x) * split_slope + split_origin.y;
|
float split_player1_position_y = (split_origin.x - player1_position.x) * split_slope + split_origin.y;
|
||||||
|
|
||||||
@@ -53,22 +51,18 @@ void fragment() {
|
|||||||
if (UV.y > split_current_y) {
|
if (UV.y > split_current_y) {
|
||||||
if (player1_position.y > split_player1_position_y) {
|
if (player1_position.y > split_player1_position_y) {
|
||||||
COLOR = vec4(view1, 1.0);
|
COLOR = vec4(view1, 1.0);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
COLOR = vec4(view2, 1.0);
|
COLOR = vec4(view2, 1.0);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (player1_position.y < split_player1_position_y) {
|
if (player1_position.y < split_player1_position_y) {
|
||||||
COLOR = vec4(view1, 1.0);
|
COLOR = vec4(view1, 1.0);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
COLOR = vec4(view2, 1.0);
|
COLOR = vec4(view2, 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
COLOR = vec4(view1, 1.0);
|
COLOR = vec4(view1, 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
[gd_scene load_steps=59 format=2]
|
[gd_scene load_steps=58 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://default_env.tres" type="Environment" id=1]
|
[ext_resource path="res://default_env.tres" type="Environment" id=1]
|
||||||
[ext_resource path="res://CameraController.gd" type="Script" id=2]
|
[ext_resource path="res://camera_controller.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://SplitScreen.shader" type="Shader" id=3]
|
[ext_resource path="res://split_screen.shader" type="Shader" id=3]
|
||||||
[ext_resource path="res://icon.png" type="Texture" id=4]
|
[ext_resource path="res://icon.png" type="Texture" id=4]
|
||||||
[ext_resource path="res://PlayerMovement.gd" type="Script" id=5]
|
[ext_resource path="res://player.gd" type="Script" id=5]
|
||||||
[ext_resource path="res://Walls.gd" type="Script" id=6]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=1]
|
[sub_resource type="ShaderMaterial" id=1]
|
||||||
shader = ExtResource( 3 )
|
shader = ExtResource( 3 )
|
||||||
@@ -180,12 +179,16 @@ script = ExtResource( 2 )
|
|||||||
|
|
||||||
[node name="View" type="TextureRect" parent="Cameras"]
|
[node name="View" type="TextureRect" parent="Cameras"]
|
||||||
material = SubResource( 1 )
|
material = SubResource( 1 )
|
||||||
margin_right = 40.0
|
anchor_right = 1.0
|
||||||
margin_bottom = 40.0
|
anchor_bottom = 1.0
|
||||||
texture = ExtResource( 4 )
|
texture = ExtResource( 4 )
|
||||||
expand = true
|
expand = true
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Viewport1" type="Viewport" parent="Cameras"]
|
[node name="Viewport1" type="Viewport" parent="Cameras"]
|
||||||
|
size = Vector2( 100, 100 )
|
||||||
render_target_v_flip = true
|
render_target_v_flip = true
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
|
|
||||||
@@ -194,6 +197,7 @@ transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20,
|
|||||||
current = true
|
current = true
|
||||||
|
|
||||||
[node name="Viewport2" type="Viewport" parent="Cameras"]
|
[node name="Viewport2" type="Viewport" parent="Cameras"]
|
||||||
|
size = Vector2( 100, 100 )
|
||||||
render_target_v_flip = true
|
render_target_v_flip = true
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
|
|
||||||
@@ -240,7 +244,6 @@ transform = Transform( 200, 0, 0, 0, 1, 0, 0, 0, 200, 0, -1, 0 )
|
|||||||
shape = SubResource( 8 )
|
shape = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Walls" type="Spatial" parent="."]
|
[node name="Walls" type="Spatial" parent="."]
|
||||||
script = ExtResource( 6 )
|
|
||||||
|
|
||||||
[node name="Group1" type="Spatial" parent="Walls"]
|
[node name="Group1" type="Spatial" parent="Walls"]
|
||||||
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
tool
|
tool
|
||||||
extends Spatial
|
extends Spatial
|
||||||
|
|
||||||
# Set a random color to all objects in the 'walls' group
|
# Set a random color to all objects in the "walls" group.
|
||||||
|
# To use, attach this script to the "Walls" node.
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
randomize()
|
randomize()
|
||||||
Reference in New Issue
Block a user