-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.tscn
121 lines (101 loc) · 3.29 KB
/
player.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[gd_scene load_steps=15 format=3 uid="uid://offi8a16f3aj"]
[ext_resource type="Script" path="res://player.gd" id="1_bkmtf"]
[ext_resource type="Resource" uid="uid://ccgraj3y6ig2s" path="res://DefaultMovementData.tres" id="2_ipbix"]
[ext_resource type="Texture2D" uid="uid://chujbc3fv2q5p" path="res://player.png" id="2_ki2md"]
[sub_resource type="AtlasTexture" id="AtlasTexture_1u14g"]
atlas = ExtResource("2_ki2md")
region = Rect2(0, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_kqmii"]
atlas = ExtResource("2_ki2md")
region = Rect2(144, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_3cvos"]
atlas = ExtResource("2_ki2md")
region = Rect2(24, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_jn3eb"]
atlas = ExtResource("2_ki2md")
region = Rect2(48, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_x7tg6"]
atlas = ExtResource("2_ki2md")
region = Rect2(72, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_4dqr0"]
atlas = ExtResource("2_ki2md")
region = Rect2(96, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_gtqcw"]
atlas = ExtResource("2_ki2md")
region = Rect2(120, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_2mj0e"]
atlas = ExtResource("2_ki2md")
region = Rect2(0, 0, 24, 20)
[sub_resource type="SpriteFrames" id="SpriteFrames_o7qb0"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_1u14g")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_kqmii")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3cvos")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jn3eb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x7tg6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4dqr0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gtqcw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2mj0e")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_n0oca"]
size = Vector2(8, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_20qod"]
size = Vector2(6, 12)
[node name="Player" type="CharacterBody2D"]
collision_layer = 2
floor_constant_speed = true
floor_snap_length = 3.0
script = ExtResource("1_bkmtf")
movement_data = ExtResource("2_ipbix")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -10)
sprite_frames = SubResource("SpriteFrames_o7qb0")
animation = &"idle"
frame_progress = 0.482294
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -8)
shape = SubResource("RectangleShape2D_n0oca")
[node name="CoyoteJumpTimer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(0, -32)
position_smoothing_enabled = true
position_smoothing_speed = 10.0
[node name="HazardDetector" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="HazardDetector"]
position = Vector2(0, -8)
shape = SubResource("RectangleShape2D_20qod")
[connection signal="area_entered" from="HazardDetector" to="." method="_on_hazard_detector_area_entered"]