-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.tscn
61 lines (51 loc) · 1.83 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
[gd_scene load_steps=9 format=3 uid="uid://bfum1boe4yuq5"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_hkvnf"]
[ext_resource type="Texture2D" uid="uid://i6w2emjqhhi0" path="res://art/playerGrey_up1.png" id="2_kfa6r"]
[ext_resource type="Texture2D" uid="uid://cch67gshthc44" path="res://art/playerGrey_up2.png" id="3_3qcif"]
[ext_resource type="Texture2D" uid="uid://0b1lidgx3wq0" path="res://art/playerGrey_walk1.png" id="4_jw1nc"]
[ext_resource type="Texture2D" uid="uid://xoov1twn1ua8" path="res://art/playerGrey_walk2.png" id="5_lrm1d"]
[sub_resource type="SpriteFrames" id="SpriteFrames_5rqlt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_kfa6r")
}, {
"duration": 1.0,
"texture": ExtResource("3_3qcif")
}],
"loop": true,
"name": &"up",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("4_jw1nc")
}, {
"duration": 1.0,
"texture": ExtResource("5_lrm1d")
}],
"loop": true,
"name": &"walk",
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_p6bwu"]
radius = 54.0
height = 136.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6uy3c"]
radius = 54.0
height = 136.0
[node name="Player" type="CharacterBody2D" groups=["Player"]]
script = ExtResource("1_hkvnf")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
rotation = 1.5708
sprite_frames = SubResource("SpriteFrames_5rqlt")
animation = &"walk"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource("CapsuleShape2D_p6bwu")
[node name="EnemyCollision" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyCollision"]
rotation = 1.5708
shape = SubResource("CapsuleShape2D_6uy3c")
[connection signal="body_entered" from="EnemyCollision" to="." method="_on_enemy_collision_body_entered"]