1
0
mirror of https://gitee.com/freeyz/godot-mota.git synced 2024-12-23 07:49:21 +08:00
godot-mota/scenes/Player.tscn

147 lines
4.1 KiB
Plaintext
Raw Normal View History

2020-07-21 20:34:34 +08:00
[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]
2020-07-23 15:47:32 +08:00
extents = Vector2( 15.9, 15.9 )
2020-07-21 20:34:34 +08:00
2020-07-23 13:20:45 +08:00
[sub_resource type="Animation" id=2]
2020-07-21 20:34:34 +08:00
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 ]
}
2020-07-23 13:20:45 +08:00
[sub_resource type="Animation" id=3]
2020-07-21 20:34:34 +08:00
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 ]
}
2020-07-23 13:20:45 +08:00
[sub_resource type="Animation" id=4]
2020-07-21 20:34:34 +08:00
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 ]
}
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeTimeScale" id=6]
2020-07-21 20:34:34 +08:00
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeAnimation" id=7]
2020-07-21 20:34:34 +08:00
animation = "right"
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeAnimation" id=8]
2020-07-21 20:34:34 +08:00
animation = "up"
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeAnimation" id=9]
2020-07-21 20:34:34 +08:00
animation = "down"
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeAnimation" id=10]
2020-07-21 20:34:34 +08:00
animation = "left"
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeBlendSpace2D" id=11]
blend_point_0/node = SubResource( 7 )
2020-07-21 20:34:34 +08:00
blend_point_0/pos = Vector2( 1, 0 )
2020-07-23 13:20:45 +08:00
blend_point_1/node = SubResource( 8 )
2020-07-21 20:34:34 +08:00
blend_point_1/pos = Vector2( 0, -0.9 )
2020-07-23 13:20:45 +08:00
blend_point_2/node = SubResource( 9 )
2020-07-21 20:34:34 +08:00
blend_point_2/pos = Vector2( 0, 1 )
2020-07-23 13:20:45 +08:00
blend_point_3/node = SubResource( 10 )
2020-07-21 20:34:34 +08:00
blend_point_3/pos = Vector2( -1, 0 )
blend_mode = 1
2020-07-23 13:20:45 +08:00
[sub_resource type="AnimationNodeBlendTree" id=12]
nodes/TimeScale/node = SubResource( 6 )
2020-07-21 20:34:34 +08:00
nodes/TimeScale/position = Vector2( 340, 40 )
nodes/output/position = Vector2( 580, 60 )
2020-07-23 13:20:45 +08:00
nodes/player/node = SubResource( 11 )
2020-07-21 20:34:34 +08:00
nodes/player/position = Vector2( 120, 40 )
2020-07-23 13:20:45 +08:00
node_connections = [ "output", 0, "TimeScale", "TimeScale", 0, "player" ]
2020-07-21 20:34:34 +08:00
2020-07-23 13:20:45 +08:00
[node name="PlayerKinematicBody2D" type="KinematicBody2D" groups=[
"player",
]]
2020-07-21 20:34:34 +08:00
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="."]
2020-07-23 13:20:45 +08:00
anims/down = SubResource( 2 )
anims/left = SubResource( 3 )
anims/right = SubResource( 4 )
2020-07-21 20:34:34 +08:00
anims/up = SubResource( 5 )
[node name="AnimationTree" type="AnimationTree" parent="."]
2020-07-23 13:20:45 +08:00
tree_root = SubResource( 12 )
2020-07-21 20:34:34 +08:00
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"]