-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.tscn
127 lines (106 loc) · 3.46 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
122
123
124
125
126
127
[gd_scene load_steps=15 format=3 uid="uid://dt7u4rascstes"]
[ext_resource type="Script" path="res://player.gd" id="1_1ka6k"]
[ext_resource type="Resource" uid="uid://bu21gauh0ud42" path="res://default_movement_data.tres" id="2_b5w26"]
[ext_resource type="Texture2D" uid="uid://d4aijr33rnc1j" path="res://assets/player.png" id="2_f5x2q"]
[sub_resource type="AtlasTexture" id="AtlasTexture_801ep"]
atlas = ExtResource("2_f5x2q")
region = Rect2(0, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_bfakk"]
atlas = ExtResource("2_f5x2q")
region = Rect2(144, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_gt0vw"]
atlas = ExtResource("2_f5x2q")
region = Rect2(24, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_pfqop"]
atlas = ExtResource("2_f5x2q")
region = Rect2(48, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_6j6hv"]
atlas = ExtResource("2_f5x2q")
region = Rect2(72, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_4gshy"]
atlas = ExtResource("2_f5x2q")
region = Rect2(96, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_adgpv"]
atlas = ExtResource("2_f5x2q")
region = Rect2(120, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_s1n12"]
atlas = ExtResource("2_f5x2q")
region = Rect2(0, 0, 24, 20)
[sub_resource type="SpriteFrames" id="SpriteFrames_srdq5"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_801ep")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_bfakk")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_gt0vw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pfqop")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6j6hv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4gshy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_adgpv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_s1n12")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wu5xp"]
size = Vector2(10, 15)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_eopya"]
size = Vector2(8, 12)
[node name="Player" type="CharacterBody2D"]
collision_layer = 2
floor_constant_speed = true
floor_snap_length = 3.0
safe_margin = 0.1
script = ExtResource("1_1ka6k")
movement_data = ExtResource("2_b5w26")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -10)
sprite_frames = SubResource("SpriteFrames_srdq5")
animation = &"idle"
frame_progress = 0.0875989
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -7.5)
shape = SubResource("RectangleShape2D_wu5xp")
[node name="CoyoteJumpTimer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[node name="WallJumpTimer" 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, -7)
shape = SubResource("RectangleShape2D_eopya")
debug_color = Color(0.584314, 0.478431, 0.717647, 0.419608)
[connection signal="area_entered" from="HazardDetector" to="." method="_on_hazard_detector_area_entered"]