forked from Miziziziz/Platformer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.tscn
83 lines (71 loc) · 2.23 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
[gd_scene load_steps=9 format=3 uid="uid://dc44ii4v7cski"]
[ext_resource type="Script" path="res://Player.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://b7626o3qkbnek" path="res://platformer_char_spritesheet.png" id="2"]
[sub_resource type="RectangleShape2D" id="1"]
size = Vector2(20, 48)
[sub_resource type="CircleShape2D" id="2"]
[sub_resource type="Animation" id="3"]
resource_name = "idle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:region_rect")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 64, 64, 64)]
}
[sub_resource type="Animation" id="4"]
resource_name = "jump"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:region_rect")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(64, 64, 64, 64)]
}
[sub_resource type="Animation" id="5"]
resource_name = "walk"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:region_rect")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [Rect2(0, 0, 64, 64), Rect2(64, 0, 64, 64), Rect2(128, 0, 64, 64), Rect2(64, 0, 64, 64)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_bmaim"]
_data = {
"idle": SubResource("3"),
"jump": SubResource("4"),
"walk": SubResource("5")
}
[node name="Player" type="CharacterBody2D"]
script = ExtResource("1")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("1")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="."]
position = Vector2(0, 14.5433)
shape = SubResource("2")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(-2.13082, -8.14894)
texture = ExtResource("2")
region_enabled = true
region_rect = Rect2(0, 64, 64, 64)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_bmaim")
}