-
Notifications
You must be signed in to change notification settings - Fork 1
/
Ghost.tscn
66 lines (51 loc) · 2.19 KB
/
Ghost.tscn
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
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Ghost.gd" type="Script" id=1]
[ext_resource path="res://images/ghost4.png" type="Texture" id=2]
[ext_resource path="res://images/ghost3.png" type="Texture" id=3]
[ext_resource path="res://images/ghost1.png" type="Texture" id=4]
[ext_resource path="res://images/ghost2.png" type="Texture" id=5]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 4 ), ExtResource( 5 ), ExtResource( 3 ), ExtResource( 2 ) ],
"loop": true,
"name": "default",
"speed": 5.0
} ]
[sub_resource type="CircleShape2D" id=2]
radius = 31.259
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 34.5761, 35.5151 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 90.2254, 33.0131 )
[node name="Ghost" type="KinematicBody2D" groups=[
"Ghost",
]]
scale = Vector2( 0.5, 0.5 )
collision_layer = 3
script = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 1 )
frame = 3
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 3 )
[node name="chasearea1" type="Area2D" parent="."]
visible = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="chasearea1"]
shape = SubResource( 4 )
[node name="chasearea2" type="Area2D" parent="."]
visible = false
rotation = 1.5708
[node name="CollisionShape2D" type="CollisionShape2D" parent="chasearea2"]
shape = SubResource( 4 )
[node name="EscapeTimer" type="Timer" parent="."]
wait_time = 1.5
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
[connection signal="body_entered" from="chasearea1" to="." method="_on_chasearea1_body_entered"]
[connection signal="body_exited" from="chasearea1" to="." method="_on_chasearea1_body_exited"]
[connection signal="body_entered" from="chasearea2" to="." method="_on_chasearea2_body_entered"]
[connection signal="body_exited" from="chasearea2" to="." method="_on_chasearea2_body_exited"]
[connection signal="timeout" from="EscapeTimer" to="." method="_on_EscapeTimer_timeout"]