mirror of
https://gitee.com/freeyz/godot-mota.git
synced 2024-12-23 02:59:20 +08:00
147 lines
4.1 KiB
Plaintext
147 lines
4.1 KiB
Plaintext
[gd_scene load_steps=17 format=2]
|
|
|
|
[ext_resource path="res://scripts/PlayerSprite.gd" type="Script" id=1]
|
|
[ext_resource path="res://scripts/PlayerKinematicBody2D.gd" type="Script" id=2]
|
|
[ext_resource path="res://scripts/ArrayTween.gd" type="Script" id=3]
|
|
[ext_resource path="res://images/mota.png" type="Texture" id=4]
|
|
|
|
[sub_resource type="RectangleShape2D" id=1]
|
|
extents = Vector2( 15.9, 15.9 )
|
|
|
|
[sub_resource type="Animation" id=2]
|
|
resource_name = "down"
|
|
length = 1.2
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("PlayerSprite: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 ),
|
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ 0, 1, 2 ]
|
|
}
|
|
|
|
[sub_resource type="Animation" id=3]
|
|
length = 1.2
|
|
loop = true
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("PlayerSprite: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 ),
|
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ 6, 7, 8 ]
|
|
}
|
|
|
|
[sub_resource type="Animation" id=4]
|
|
length = 1.2
|
|
loop = true
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("PlayerSprite: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 ),
|
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ 9, 10, 11 ]
|
|
}
|
|
|
|
[sub_resource type="Animation" id=5]
|
|
resource_name = "up"
|
|
length = 1.2
|
|
loop = true
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("PlayerSprite: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 ),
|
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ 3, 4, 5 ]
|
|
}
|
|
|
|
[sub_resource type="AnimationNodeTimeScale" id=6]
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=7]
|
|
animation = "right"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=8]
|
|
animation = "up"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=9]
|
|
animation = "down"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=10]
|
|
animation = "left"
|
|
|
|
[sub_resource type="AnimationNodeBlendSpace2D" id=11]
|
|
blend_point_0/node = SubResource( 7 )
|
|
blend_point_0/pos = Vector2( 1, 0 )
|
|
blend_point_1/node = SubResource( 8 )
|
|
blend_point_1/pos = Vector2( 0, -0.9 )
|
|
blend_point_2/node = SubResource( 9 )
|
|
blend_point_2/pos = Vector2( 0, 1 )
|
|
blend_point_3/node = SubResource( 10 )
|
|
blend_point_3/pos = Vector2( -1, 0 )
|
|
blend_mode = 1
|
|
|
|
[sub_resource type="AnimationNodeBlendTree" id=12]
|
|
nodes/TimeScale/node = SubResource( 6 )
|
|
nodes/TimeScale/position = Vector2( 340, 40 )
|
|
nodes/output/position = Vector2( 580, 60 )
|
|
nodes/player/node = SubResource( 11 )
|
|
nodes/player/position = Vector2( 120, 40 )
|
|
node_connections = [ "output", 0, "TimeScale", "TimeScale", 0, "player" ]
|
|
|
|
[node name="PlayerKinematicBody2D" type="KinematicBody2D" groups=[
|
|
"player",
|
|
]]
|
|
position = Vector2( 336, 208 )
|
|
script = ExtResource( 2 )
|
|
__meta__ = {
|
|
"_edit_group_": true
|
|
}
|
|
navigation_tile_map_path = NodePath("../NavigationTileMap")
|
|
|
|
[node name="ArrayTween" type="Tween" parent="."]
|
|
script = ExtResource( 3 )
|
|
duration = 0.1
|
|
|
|
[node name="PlayerSprite" type="Sprite" parent="."]
|
|
texture = ExtResource( 4 )
|
|
vframes = 3
|
|
hframes = 4
|
|
region_enabled = true
|
|
region_rect = Rect2( 192, 192, 128, 96 )
|
|
script = ExtResource( 1 )
|
|
|
|
[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="AnimationTree" type="AnimationTree" parent="."]
|
|
tree_root = SubResource( 12 )
|
|
anim_player = NodePath("../AnimationPlayer")
|
|
parameters/TimeScale/scale = 10.0
|
|
parameters/player/blend_position = Vector2( -0.0495575, -0.190751 )
|
|
[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"]
|