mirror of
https://gitee.com/freeyz/godot-mota.git
synced 2024-09-28 06:34:09 +08:00
144 lines
3.9 KiB
Plaintext
144 lines
3.9 KiB
Plaintext
|
[gd_scene load_steps=16 format=2]
|
||
|
|
||
|
[ext_resource path="res://src/player/ArrayTween.gd" type="Script" id=1]
|
||
|
[ext_resource path="res://src/player/Player.gd" type="Script" id=2]
|
||
|
[ext_resource path="res://assets/images/brave.png" type="Texture" id=3]
|
||
|
|
||
|
[sub_resource type="RectangleShape2D" id=1]
|
||
|
extents = Vector2( 15.9, 15.9 )
|
||
|
|
||
|
[sub_resource type="Animation" id=2]
|
||
|
resource_name = "down"
|
||
|
length = 1.6
|
||
|
loop = true
|
||
|
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.4, 0.8, 1.2 ),
|
||
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||
|
"update": 1,
|
||
|
"values": [ 0, 1, 2, 3 ]
|
||
|
}
|
||
|
|
||
|
[sub_resource type="Animation" id=3]
|
||
|
resource_name = "left"
|
||
|
length = 1.6
|
||
|
loop = true
|
||
|
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.4, 0.8, 1.2 ),
|
||
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||
|
"update": 1,
|
||
|
"values": [ 4, 5, 6, 7 ]
|
||
|
}
|
||
|
|
||
|
[sub_resource type="Animation" id=4]
|
||
|
resource_name = "right"
|
||
|
length = 1.6
|
||
|
loop = true
|
||
|
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.4, 0.8, 1.2 ),
|
||
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||
|
"update": 1,
|
||
|
"values": [ 8, 9, 10, 11 ]
|
||
|
}
|
||
|
|
||
|
[sub_resource type="Animation" id=5]
|
||
|
resource_name = "up"
|
||
|
length = 1.6
|
||
|
loop = true
|
||
|
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.4, 0.8, 1.2 ),
|
||
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||
|
"update": 1,
|
||
|
"values": [ 12, 13, 14, 15 ]
|
||
|
}
|
||
|
|
||
|
[sub_resource type="AnimationNodeTimeScale" id=12]
|
||
|
|
||
|
[sub_resource type="AnimationNodeAnimation" id=6]
|
||
|
animation = "left"
|
||
|
|
||
|
[sub_resource type="AnimationNodeAnimation" id=7]
|
||
|
animation = "up"
|
||
|
|
||
|
[sub_resource type="AnimationNodeAnimation" id=8]
|
||
|
animation = "down"
|
||
|
|
||
|
[sub_resource type="AnimationNodeAnimation" id=9]
|
||
|
animation = "right"
|
||
|
|
||
|
[sub_resource type="AnimationNodeBlendSpace2D" id=10]
|
||
|
blend_point_0/node = SubResource( 6 )
|
||
|
blend_point_0/pos = Vector2( -1, 0 )
|
||
|
blend_point_1/node = SubResource( 7 )
|
||
|
blend_point_1/pos = Vector2( 0, -1 )
|
||
|
blend_point_2/node = SubResource( 8 )
|
||
|
blend_point_2/pos = Vector2( 0, 1 )
|
||
|
blend_point_3/node = SubResource( 9 )
|
||
|
blend_point_3/pos = Vector2( 1, 0 )
|
||
|
blend_mode = 1
|
||
|
|
||
|
[sub_resource type="AnimationNodeBlendTree" id=11]
|
||
|
graph_offset = Vector2( -55, 58 )
|
||
|
nodes/TimeScale/node = SubResource( 12 )
|
||
|
nodes/TimeScale/position = Vector2( 220, 100 )
|
||
|
nodes/output/position = Vector2( 420, 100 )
|
||
|
nodes/player/node = SubResource( 10 )
|
||
|
nodes/player/position = Vector2( 0, 100 )
|
||
|
node_connections = [ "output", 0, "TimeScale", "TimeScale", 0, "player" ]
|
||
|
|
||
|
[node name="Player" type="KinematicBody2D"]
|
||
|
script = ExtResource( 2 )
|
||
|
__meta__ = {
|
||
|
"_edit_group_": true
|
||
|
}
|
||
|
navigation_tile_map_path = NodePath("../NavigationTileMap")
|
||
|
|
||
|
[node name="Sprite" type="Sprite" parent="."]
|
||
|
texture = ExtResource( 3 )
|
||
|
vframes = 4
|
||
|
hframes = 4
|
||
|
|
||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||
|
shape = SubResource( 1 )
|
||
|
|
||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||
|
anims/down = SubResource( 2 )
|
||
|
anims/left = SubResource( 3 )
|
||
|
anims/right = SubResource( 4 )
|
||
|
anims/up = SubResource( 5 )
|
||
|
|
||
|
[node name="ArrayTween" type="Tween" parent="."]
|
||
|
script = ExtResource( 1 )
|
||
|
duration = 0.1
|
||
|
|
||
|
[node name="AnimationTree" type="AnimationTree" parent="."]
|
||
|
tree_root = SubResource( 11 )
|
||
|
anim_player = NodePath("../AnimationPlayer")
|
||
|
parameters/TimeScale/scale = 10.0
|
||
|
parameters/player/blend_position = Vector2( 0, 0 )
|
||
|
[connection signal="array_completed" from="ArrayTween" to="." method="_on_ArrayTween_array_completed"]
|
||
|
[connection signal="array_value_step" from="ArrayTween" to="." method="_on_ArrayTween_array_value_step"]
|