-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.tscn
126 lines (105 loc) · 3.4 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
[gd_scene load_steps=15 format=3 uid="uid://bvoh1wfd5i6s5"]
[ext_resource type="Script" path="res://player.gd" id="1_lbhnh"]
[ext_resource type="Resource" uid="uid://cecy5mtbqsc0g" path="res://DefaultMovementData.tres" id="2_ehfg5"]
[ext_resource type="Texture2D" uid="uid://doth07awostye" path="res://assets/player.png" id="3_5m06s"]
[sub_resource type="AtlasTexture" id="AtlasTexture_634wr"]
atlas = ExtResource("3_5m06s")
region = Rect2(0, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_yq3a5"]
atlas = ExtResource("3_5m06s")
region = Rect2(144, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_ujqr0"]
atlas = ExtResource("3_5m06s")
region = Rect2(24, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_os53b"]
atlas = ExtResource("3_5m06s")
region = Rect2(48, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_yql4j"]
atlas = ExtResource("3_5m06s")
region = Rect2(72, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_kq28t"]
atlas = ExtResource("3_5m06s")
region = Rect2(96, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_lbibp"]
atlas = ExtResource("3_5m06s")
region = Rect2(120, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_86sjw"]
atlas = ExtResource("3_5m06s")
region = Rect2(0, 0, 24, 20)
[sub_resource type="SpriteFrames" id="SpriteFrames_rdx5p"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_634wr")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_yq3a5")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ujqr0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_os53b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yql4j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kq28t")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lbibp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_86sjw")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_gno3f"]
size = Vector2(8, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2dola"]
size = Vector2(6, 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_lbhnh")
movement_data = ExtResource("2_ehfg5")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -10)
sprite_frames = SubResource("SpriteFrames_rdx5p")
animation = &"idle"
frame_progress = 0.307873
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -8)
shape = SubResource("RectangleShape2D_gno3f")
[node name="CoyoteJumpTimer" type="Timer" parent="."]
wait_time = 0.15
one_shot = true
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(0, -32)
position_smoothing_enabled = true
position_smoothing_speed = 2.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_2dola")
[node name="WallJumpTimer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[connection signal="area_entered" from="HazardDetector" to="." method="_on_hazard_detector_area_entered"]