-
Notifications
You must be signed in to change notification settings - Fork 15
/
player.tscn
126 lines (105 loc) · 3.39 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://b3vkmfxunohh8"]
[ext_resource type="Script" path="res://player.gd" id="1_1h0vt"]
[ext_resource type="Resource" uid="uid://nhd5voo3ikx1" path="res://DefaultMovementData.tres" id="2_06uy6"]
[ext_resource type="Texture2D" uid="uid://db34qqr0dkden" path="res://player.png" id="2_jlvsk"]
[sub_resource type="AtlasTexture" id="AtlasTexture_2qeu2"]
atlas = ExtResource("2_jlvsk")
region = Rect2(0, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_afbgn"]
atlas = ExtResource("2_jlvsk")
region = Rect2(144, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_ejwk3"]
atlas = ExtResource("2_jlvsk")
region = Rect2(24, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_gegio"]
atlas = ExtResource("2_jlvsk")
region = Rect2(48, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_e0ibb"]
atlas = ExtResource("2_jlvsk")
region = Rect2(72, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_f45b6"]
atlas = ExtResource("2_jlvsk")
region = Rect2(96, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_4brbp"]
atlas = ExtResource("2_jlvsk")
region = Rect2(120, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_572d7"]
atlas = ExtResource("2_jlvsk")
region = Rect2(0, 0, 24, 20)
[sub_resource type="SpriteFrames" id="SpriteFrames_v2gsa"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2qeu2")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_afbgn")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ejwk3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gegio")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e0ibb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f45b6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4brbp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_572d7")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_delq7"]
size = Vector2(8, 15)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1anyu"]
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_1h0vt")
movement_data = ExtResource("2_06uy6")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -10)
sprite_frames = SubResource("SpriteFrames_v2gsa")
animation = &"idle"
frame_progress = 0.429613
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -7.5)
shape = SubResource("RectangleShape2D_delq7")
[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_1anyu")
[connection signal="area_entered" from="HazardDetector" to="." method="_on_hazard_detector_area_entered"]