sokoban
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[gd_scene load_steps=7 format=2]

[ext_resource path="res://box.png" type="Texture" id=1]
[ext_resource path="res://Box.gd" type="Script" id=2]
[ext_resource path="res://Check.png" type="Texture" id=3]
[ext_resource path="res://box_normal.png" type="Texture" id=4]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 8.5, 8.5 )

[sub_resource type="OccluderPolygon2D" id=2]
polygon = PoolVector2Array( 0, 0, 0, 16, 16, 16, 16, 0 )

[node name="Crate" type="KinematicBody2D" groups=["crates"]]
script = ExtResource( 2 )

[node name="Crate" type="Sprite" parent="."]
light_mask = 3
texture = ExtResource( 1 )
normal_map = ExtResource( 4 )
centered = false

[node name="CheckSprite" type="Sprite" parent="."]
visible = false
light_mask = 0
position = Vector2( 8, 8 )
texture = ExtResource( 3 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
light_mask = 0
position = Vector2( 8, 8 )
shape = SubResource( 1 )

[node name="RayCast" type="RayCast2D" parent="."]
visible = false
position = Vector2( 8, 8 )

[node name="Tween" type="Tween" parent="."]

[node name="LightOccluder2D" type="LightOccluder2D" parent="."]
visible = false
occluder = SubResource( 2 )

[node name="WallChecks" type="Node2D" parent="."]
visible = false

[node name="LR" type="Node2D" parent="WallChecks"]

[node name="Left" type="RayCast2D" parent="WallChecks/LR"]
position = Vector2( 8, 8 )
enabled = true
cast_to = Vector2( -10, 0 )
collision_mask = 2

[node name="Right" type="RayCast2D" parent="WallChecks/LR"]
position = Vector2( 8, 8 )
enabled = true
cast_to = Vector2( 10, 0 )
collision_mask = 2

[node name="DU" type="Node2D" parent="WallChecks"]

[node name="Down" type="RayCast2D" parent="WallChecks/DU"]
position = Vector2( 8, 8 )
enabled = true
cast_to = Vector2( 0, 10 )
collision_mask = 2

[node name="Up" type="RayCast2D" parent="WallChecks/DU"]
position = Vector2( 8, 8 )
enabled = true
cast_to = Vector2( 0, -10 )
collision_mask = 2

[connection signal="tween_all_completed" from="Tween" to="." method="_on_Tween_tween_all_completed"]