-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYellowSnake.tscn
57 lines (48 loc) · 1.49 KB
/
YellowSnake.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
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Snake.gd" type="Script" id=1]
[ext_resource path="res://yellowsnakejab.png" type="Texture" id=2]
[ext_resource path="res://yellowsnakemove.png" type="Texture" id=3]
[ext_resource path="res://yellowsnakeidle.png" type="Texture" id=4]
[ext_resource path="res://snakeattack.wav" type="AudioStream" id=5]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 5.00735, 4.95021 )
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ ExtResource( 4 ) ],
"loop": true,
"name": "default",
"speed": 5.0
}, {
"frames": [ ExtResource( 2 ) ],
"loop": false,
"name": "attack",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ) ],
"loop": false,
"name": "move",
"speed": 5.0
} ]
[node name="YellowSnake" type="KinematicBody2D" groups=[
"enemies",
]]
collision_layer = 2
collision_mask = 3
script = ExtResource( 1 )
health = 10
speed = 25
damage = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 5, 5 )
shape = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 2 )
centered = false
[node name="MoveOff" type="Timer" parent="."]
wait_time = 0.25
[node name="MoveOn" type="Timer" parent="."]
wait_time = 0.25
[node name="SnakeAttack" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 5 )
[connection signal="timeout" from="MoveOff" to="." method="_on_CoolDown_timeout"]
[connection signal="timeout" from="MoveOn" to="." method="_on_MoveOn_timeout"]