-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.tscn
135 lines (119 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
127
128
129
130
131
132
133
134
135
[gd_scene load_steps=13 format=2]
[ext_resource path="res://gfx/character.png" type="Texture" id=1]
[ext_resource path="res://Player.gd" type="Script" id=2]
[sub_resource type="Animation" id=1]
resource_name = "walk_down"
length = 0.8
loop = true
step = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3 ]
}
[sub_resource type="Animation" id=2]
resource_name = "walk_left"
length = 0.8
loop = true
step = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 51, 52, 53, 54 ]
}
[sub_resource type="Animation" id=3]
resource_name = "walk_right"
length = 0.8
loop = true
step = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 17, 18, 19, 20 ]
}
[sub_resource type="Animation" id=4]
resource_name = "walk_up"
length = 0.8
loop = true
step = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 34, 35, 36, 37 ]
}
[sub_resource type="AnimationNodeAnimation" id=5]
animation = "walk_up"
[sub_resource type="AnimationNodeAnimation" id=6]
animation = "walk_left"
[sub_resource type="AnimationNodeAnimation" id=7]
animation = "walk_down"
[sub_resource type="AnimationNodeAnimation" id=8]
animation = "walk_right"
[sub_resource type="AnimationNodeBlendSpace2D" id=9]
blend_point_0/node = SubResource( 5 )
blend_point_0/pos = Vector2( 0, -1.1 )
blend_point_1/node = SubResource( 6 )
blend_point_1/pos = Vector2( -1, 0 )
blend_point_2/node = SubResource( 7 )
blend_point_2/pos = Vector2( 0, 1.1 )
blend_point_3/node = SubResource( 8 )
blend_point_3/pos = Vector2( 1, 0 )
min_space = Vector2( -1, -1.1 )
max_space = Vector2( 1, 1.1 )
blend_mode = 1
[sub_resource type="CapsuleShape2D" id=10]
radius = 4.73309
height = 0.0
[node name="Player" type="KinematicBody2D"]
position = Vector2( 218.814, 193.127 )
collision_layer = 0
script = ExtResource( 2 )
walk_velocity = 70.0
player_id = 1
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( -0.165543, -5.6615 )
texture = ExtResource( 1 )
hframes = 17
vframes = 8
frame = 34
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/walk_down = SubResource( 1 )
anims/walk_left = SubResource( 2 )
anims/walk_right = SubResource( 3 )
anims/walk_up = SubResource( 4 )
[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource( 9 )
anim_player = NodePath("../AnimationPlayer")
active = true
parameters/blend_position = Vector2( -0.0236406, -0.776824 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -0.231751, 0.463504 )
shape = SubResource( 10 )