2020-07-17 11:26:02 -05:00
|
|
|
[gd_scene load_steps=10 format=2]
|
2020-07-17 10:33:15 -05:00
|
|
|
|
|
|
|
[ext_resource path="res://script/player.gd" type="Script" id=1]
|
2020-07-17 11:26:02 -05:00
|
|
|
[ext_resource path="res://meta/BoundedCamera.tscn" type="PackedScene" id=2]
|
|
|
|
[ext_resource path="res://script/PlayerStateMachine.gd" type="Script" id=3]
|
|
|
|
[ext_resource path="res://art/WizardM.png" type="Texture" id=4]
|
2020-07-17 10:33:15 -05:00
|
|
|
|
2020-07-17 11:26:02 -05:00
|
|
|
[sub_resource type="OccluderPolygon2D" id=1]
|
2020-07-17 10:33:15 -05:00
|
|
|
polygon = PoolVector2Array( -7, 0, -7, -2, -6, -2, -6, -3, -5, -3, -5, -5, -6, -5, -6, -10, -7, -10, -7, -12, -6, -12, -6, -19, -4, -19, -4, -18, -3, -18, -3, -17, 1, -17, 1, -16, 3, -16, 3, -15, 4, -15, 4, -14, 5, -14, 5, -13, 6, -13, 6, -12, 7, -12, 7, -10, 6, -10, 6, -9, 5, -9, 5, -8, 6, -8, 6, -4, 5, -4, 5, 0, -7, 0 )
|
|
|
|
|
2020-07-17 11:26:02 -05:00
|
|
|
[sub_resource type="RectangleShape2D" id=2]
|
2020-07-17 10:33:15 -05:00
|
|
|
extents = Vector2( 6, 6 )
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id=3]
|
|
|
|
resource_name = "Idle"
|
|
|
|
length = 0.8
|
|
|
|
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.2, 0.4, 0.6 ),
|
|
|
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
|
|
|
"update": 1,
|
|
|
|
"values": [ 0, 1, 2, 3 ]
|
|
|
|
}
|
|
|
|
|
2020-07-17 11:26:02 -05:00
|
|
|
[sub_resource type="Animation" id=4]
|
2020-07-17 10:33:15 -05:00
|
|
|
resource_name = "Jumping"
|
|
|
|
length = 0.01
|
|
|
|
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 ),
|
|
|
|
"transitions": PoolRealArray( 1 ),
|
|
|
|
"update": 1,
|
|
|
|
"values": [ 11 ]
|
|
|
|
}
|
|
|
|
|
2020-07-17 11:26:02 -05:00
|
|
|
[sub_resource type="Animation" id=5]
|
2020-07-17 10:33:15 -05:00
|
|
|
length = 0.4
|
|
|
|
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.1, 0.2, 0.3 ),
|
|
|
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
|
|
|
"update": 1,
|
|
|
|
"values": [ 4, 5, 6, 7 ]
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="Player" type="KinematicBody2D"]
|
|
|
|
script = ExtResource( 1 )
|
|
|
|
|
2020-07-17 11:26:02 -05:00
|
|
|
[node name="Node2D" parent="." instance=ExtResource( 2 )]
|
2020-07-17 12:07:59 -05:00
|
|
|
current = true
|
2020-07-17 11:26:02 -05:00
|
|
|
smoothing_enabled = true
|
|
|
|
drag_margin_left = 0.0
|
|
|
|
drag_margin_top = 0.75
|
|
|
|
drag_margin_right = 0.0
|
|
|
|
drag_margin_bottom = 0.0
|
|
|
|
|
2020-07-17 10:33:15 -05:00
|
|
|
[node name="PlayerStateMachine" type="Node" parent="."]
|
2020-07-17 11:26:02 -05:00
|
|
|
script = ExtResource( 3 )
|
2020-07-17 10:33:15 -05:00
|
|
|
|
|
|
|
[node name="Sprite" type="Sprite" parent="."]
|
|
|
|
position = Vector2( 0, -12 )
|
2020-07-17 11:26:02 -05:00
|
|
|
texture = ExtResource( 4 )
|
2020-07-17 10:33:15 -05:00
|
|
|
vframes = 3
|
|
|
|
hframes = 4
|
|
|
|
|
|
|
|
[node name="LightOccluder2D" type="LightOccluder2D" parent="Sprite"]
|
|
|
|
visible = false
|
|
|
|
position = Vector2( 0, 12 )
|
2020-07-17 11:26:02 -05:00
|
|
|
occluder = SubResource( 1 )
|
2020-07-17 10:33:15 -05:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
|
|
position = Vector2( 0, -6 )
|
2020-07-17 11:26:02 -05:00
|
|
|
shape = SubResource( 2 )
|
2020-07-17 10:33:15 -05:00
|
|
|
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
|
|
anims/Idle = SubResource( 3 )
|
2020-07-17 11:26:02 -05:00
|
|
|
anims/Jumping = SubResource( 4 )
|
|
|
|
anims/Running = SubResource( 5 )
|
2020-07-17 10:33:15 -05:00
|
|
|
|
|
|
|
[node name="CoyoteTimer" type="Timer" parent="."]
|
|
|
|
wait_time = 0.1
|
|
|
|
one_shot = true
|
2020-07-17 11:26:02 -05:00
|
|
|
[connection signal="grounded_updated" from="." to="Node2D" method="_on_grounded_updated"]
|