summaryrefslogtreecommitdiff
path: root/src/entities/actors/snake/scenes/Head.tscn
blob: b9180c3b765fb27ede431cc8a8744049aca34e21 (plain)
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
[gd_scene load_steps=15 format=2]

[ext_resource path="res://entities/actors/snake/sprites/head.png" type="Texture" id=1]
[ext_resource path="res://entities/actors/snake/scripts/head.gd" type="Script" id=2]
[ext_resource path="res://entities/actors/snake/sprites/tongue.png" type="Texture" id=3]
[ext_resource path="res://entities/actors/snake/scripts/state_machine.gd" type="Script" id=4]
[ext_resource path="res://entities/actors/snake/scripts/normal_state.gd" type="Script" id=5]
[ext_resource path="res://entities/actors/snake/scripts/dash_state.gd" type="Script" id=6]
[ext_resource path="res://entities/actors/snake/scripts/slow_state.gd" type="Script" id=7]
[ext_resource path="res://entities/actors/snake/scripts/jump_state.gd" type="Script" id=8]

[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 4, 4 )

[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 3 )
region = Rect2( 4, 0, 4, 4 )

[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 3 )
region = Rect2( 8, 0, 4, 4 )

[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 3 )
region = Rect2( 12, 0, 4, 4 )

[sub_resource type="SpriteFrames" id=6]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
"loop": false,
"name": "default",
"speed": 15.0
} ]

[sub_resource type="CircleShape2D" id=1]
radius = 2.0

[node name="Head" type="KinematicBody2D"]
collision_mask = 262
script = ExtResource( 2 )

[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 4 )

[node name="NormalState" type="Node" parent="StateMachine"]
script = ExtResource( 5 )

[node name="DashState" type="Node" parent="StateMachine"]
script = ExtResource( 6 )

[node name="SlowState" type="Node" parent="StateMachine"]
script = ExtResource( 7 )

[node name="JumpState" type="Node" parent="StateMachine"]
script = ExtResource( 8 )

[node name="Tongue" type="AnimatedSprite" parent="."]
position = Vector2( 0, -5 )
frames = SubResource( 6 )

[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )

[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2( 0, -2 )
shape = SubResource( 1 )