-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.tscn
88 lines (72 loc) · 2.5 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
[gd_scene load_steps=11 format=3 uid="uid://d3ex0i15hdem2"]
[ext_resource type="Script" path="res://player.gd" id="1_qgdqf"]
[ext_resource type="Resource" uid="uid://4sa3w44u6p1b" path="res://DefaultMovementData.tres" id="2_02j3i"]
[ext_resource type="Texture2D" uid="uid://dreiy8b45vsu7" path="res://robot-thing.png" id="2_5tpua"]
[sub_resource type="AtlasTexture" id="AtlasTexture_6tte3"]
atlas = ExtResource("2_5tpua")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xu8qg"]
atlas = ExtResource("2_5tpua")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_qnukp"]
atlas = ExtResource("2_5tpua")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_nuwhh"]
atlas = ExtResource("2_5tpua")
region = Rect2(96, 0, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_dm6i3"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6tte3")
}],
"loop": false,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_xu8qg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qnukp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nuwhh")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vt1if"]
size = Vector2(7, 24)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hu4vf"]
size = Vector2(5, 22)
[node name="Player" type="CharacterBody2D"]
collision_layer = 2
collision_mask = 5
floor_snap_length = 2.0
script = ExtResource("1_qgdqf")
movement_data = ExtResource("2_02j3i")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -12)
sprite_frames = SubResource("SpriteFrames_dm6i3")
animation = &"run"
frame_progress = 0.480987
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.5, -12)
shape = SubResource("RectangleShape2D_vt1if")
[node name="CoyoteTimer" 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.5, -12)
shape = SubResource("RectangleShape2D_hu4vf")
[connection signal="area_entered" from="HazardDetector" to="." method="_on_hazard_detector_area_entered"]