aboutsummaryrefslogtreecommitdiff
path: root/entities/player/Player.tscn
diff options
context:
space:
mode:
Diffstat (limited to 'entities/player/Player.tscn')
-rw-r--r--entities/player/Player.tscn128
1 files changed, 106 insertions, 22 deletions
diff --git a/entities/player/Player.tscn b/entities/player/Player.tscn
index 26ade6f..bb0cea8 100644
--- a/entities/player/Player.tscn
+++ b/entities/player/Player.tscn
@@ -1,8 +1,7 @@
-[gd_scene load_steps=52 format=2]
+[gd_scene load_steps=64 format=2]
[ext_resource path="res://pinkman/run/run7.png" type="Texture" id=1]
[ext_resource path="res://pinkman/double-jump/double_jump6.png" type="Texture" id=2]
-[ext_resource path="res://pinkman/hit/hit6.png" type="Texture" id=3]
[ext_resource path="res://pinkman/idle/idle4.png" type="Texture" id=4]
[ext_resource path="res://pinkman/wall-jump/wall-jump2.png" type="Texture" id=5]
[ext_resource path="res://pinkman/fall/fall.png" type="Texture" id=6]
@@ -35,13 +34,10 @@
[ext_resource path="res://pinkman/hit/hit3.png" type="Texture" id=33]
[ext_resource path="res://pinkman/run/run1.png" type="Texture" id=34]
[ext_resource path="res://pinkman/run/run8.png" type="Texture" id=35]
-[ext_resource path="res://pinkman/hit/hit5.png" type="Texture" id=36]
[ext_resource path="res://pinkman/run/run10.png" type="Texture" id=37]
-[ext_resource path="res://pinkman/hit/hit4.png" type="Texture" id=38]
[ext_resource path="res://pinkman/run/run2.png" type="Texture" id=39]
[ext_resource path="res://pinkman/run/run12.png" type="Texture" id=40]
[ext_resource path="res://pinkman/run/run3.png" type="Texture" id=41]
-[ext_resource path="res://pinkman/hit/hit7.png" type="Texture" id=42]
[ext_resource path="res://pinkman/run/run4.png" type="Texture" id=43]
[ext_resource path="res://entities/player/Player.gd" type="Script" id=44]
@@ -53,36 +49,36 @@ animations = [ {
"frames": [ ExtResource( 12 ), ExtResource( 29 ), ExtResource( 20 ), ExtResource( 4 ), ExtResource( 22 ), ExtResource( 23 ), ExtResource( 13 ), ExtResource( 27 ), ExtResource( 21 ), ExtResource( 28 ), ExtResource( 9 ) ],
"loop": true,
"name": "idle",
-"speed": 25.0
+"speed": 15.0
}, {
-"frames": [ ExtResource( 17 ), ExtResource( 5 ), ExtResource( 30 ), ExtResource( 15 ), ExtResource( 14 ) ],
-"loop": true,
-"name": "wall_jump",
-"speed": 25.0
-}, {
-"frames": [ ExtResource( 6 ) ],
+"frames": [ ExtResource( 34 ), ExtResource( 39 ), ExtResource( 41 ), ExtResource( 43 ), ExtResource( 32 ), ExtResource( 11 ), ExtResource( 1 ), ExtResource( 35 ), ExtResource( 26 ), ExtResource( 37 ), ExtResource( 16 ), ExtResource( 40 ) ],
"loop": true,
-"name": "fall",
-"speed": 5.0
+"name": "run",
+"speed": 15.0
}, {
"frames": [ ExtResource( 8 ), ExtResource( 19 ), ExtResource( 10 ), ExtResource( 25 ), ExtResource( 24 ), ExtResource( 2 ) ],
"loop": true,
"name": "double_jump",
"speed": 25.0
}, {
-"frames": [ ExtResource( 7 ), ExtResource( 31 ), ExtResource( 33 ), ExtResource( 38 ), ExtResource( 36 ), ExtResource( 3 ), ExtResource( 42 ) ],
+"frames": [ ExtResource( 6 ) ],
"loop": true,
-"name": "hit",
-"speed": 30.0
+"name": "fall",
+"speed": 5.0
}, {
"frames": [ ExtResource( 18 ) ],
"loop": true,
"name": "jump",
"speed": 5.0
}, {
-"frames": [ ExtResource( 34 ), ExtResource( 39 ), ExtResource( 41 ), ExtResource( 43 ), ExtResource( 32 ), ExtResource( 11 ), ExtResource( 1 ), ExtResource( 35 ), ExtResource( 26 ), ExtResource( 37 ), ExtResource( 16 ), ExtResource( 40 ) ],
+"frames": [ ExtResource( 7 ), ExtResource( 31 ), ExtResource( 33 ) ],
"loop": true,
-"name": "run",
+"name": "hit",
+"speed": 30.0
+}, {
+"frames": [ ExtResource( 17 ), ExtResource( 5 ), ExtResource( 30 ), ExtResource( 15 ), ExtResource( 14 ) ],
+"loop": true,
+"name": "wall_jump",
"speed": 25.0
} ]
@@ -113,8 +109,37 @@ tracks/1/keys = {
"values": [ 0 ]
}
+[sub_resource type="Animation" id=12]
+resource_name = "fall"
+tracks/0/type = "value"
+tracks/0/path = NodePath(".:animation")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/keys = {
+"times": PoolRealArray( 0 ),
+"transitions": PoolRealArray( 1 ),
+"update": 1,
+"values": [ "fall" ]
+}
+tracks/1/type = "value"
+tracks/1/path = NodePath(".:frame")
+tracks/1/interp = 1
+tracks/1/loop_wrap = true
+tracks/1/imported = false
+tracks/1/enabled = true
+tracks/1/keys = {
+"times": PoolRealArray( 0 ),
+"transitions": PoolRealArray( 1 ),
+"update": 1,
+"values": [ 0 ]
+}
+
[sub_resource type="Animation" id=7]
resource_name = "hit"
+length = 0.1
+loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:animation")
tracks/0/interp = 1
@@ -134,10 +159,10 @@ tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
-"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ),
-"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
+"times": PoolRealArray( 0, 0.05 ),
+"transitions": PoolRealArray( 1, 1 ),
"update": 1,
-"values": [ 1, 2, 3, 4, 5, 6 ]
+"values": [ 1, 2 ]
}
[sub_resource type="Animation" id=4]
@@ -197,6 +222,8 @@ tracks/1/keys = {
[sub_resource type="Animation" id=6]
resource_name = "run"
+loop = true
+step = 0.0666667
tracks/0/type = "value"
tracks/0/path = NodePath(".:animation")
tracks/0/interp = 1
@@ -222,8 +249,58 @@ tracks/1/keys = {
"values": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
}
+[sub_resource type="AnimationNodeAnimation" id=13]
+animation = "fall"
+
+[sub_resource type="AnimationNodeAnimation" id=14]
+animation = "hit"
+
+[sub_resource type="AnimationNodeAnimation" id=15]
+animation = "idle"
+
+[sub_resource type="AnimationNodeAnimation" id=16]
+animation = "jump"
+
+[sub_resource type="AnimationNodeAnimation" id=17]
+animation = "run"
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=36]
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=37]
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=38]
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=39]
+switch_mode = 2
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=40]
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=41]
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=42]
+
+[sub_resource type="AnimationNodeStateMachineTransition" id=43]
+
+[sub_resource type="AnimationNodeStateMachine" id=34]
+states/fall/node = SubResource( 13 )
+states/fall/position = Vector2( 439, 336.778 )
+states/hit/node = SubResource( 14 )
+states/hit/position = Vector2( 695.445, 173.667 )
+states/idle/node = SubResource( 15 )
+states/idle/position = Vector2( 447.691, 183 )
+states/jump/node = SubResource( 16 )
+states/jump/position = Vector2( 195, 173.815 )
+states/run/node = SubResource( 17 )
+states/run/position = Vector2( 446.852, 43 )
+transitions = [ "idle", "run", SubResource( 36 ), "run", "idle", SubResource( 37 ), "idle", "hit", SubResource( 38 ), "hit", "idle", SubResource( 39 ), "jump", "idle", SubResource( 40 ), "idle", "jump", SubResource( 41 ), "fall", "idle", SubResource( 42 ), "idle", "fall", SubResource( 43 ) ]
+start_node = "idle"
+graph_offset = Vector2( -117, -61.1126 )
+
+[sub_resource type="AnimationNodeStateMachinePlayback" id=35]
+
[node name="Player" type="KinematicBody2D" groups=["player"]]
z_index = 1
+collision_mask = 2
script = ExtResource( 44 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
@@ -242,7 +319,14 @@ animation = "idle"
[node name="AnimationPlayer" type="AnimationPlayer" parent="AnimatedSprite"]
anims/RESET = SubResource( 3 )
+anims/fall = SubResource( 12 )
anims/hit = SubResource( 7 )
anims/idle = SubResource( 4 )
anims/jump = SubResource( 5 )
anims/run = SubResource( 6 )
+
+[node name="AnimationTree" type="AnimationTree" parent="."]
+tree_root = SubResource( 34 )
+anim_player = NodePath("../AnimatedSprite/AnimationPlayer")
+active = true
+parameters/playback = SubResource( 35 )