Make animations and wip anim tree
This commit is contained in:
parent
5d7407ac33
commit
41814fde8a
5 changed files with 742 additions and 127 deletions
BIN
animations/player/player_WalkLeft.res
Normal file
BIN
animations/player/player_WalkLeft.res
Normal file
Binary file not shown.
BIN
animations/player/player_WalkRight.res
Normal file
BIN
animations/player/player_WalkRight.res
Normal file
Binary file not shown.
|
@ -8,7 +8,7 @@
|
||||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_dixrq"]
|
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_dixrq"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bjsqx"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bjsqx"]
|
||||||
size = Vector2(114.609, 187.146)
|
size = Vector2(64.4614, 47.0722)
|
||||||
|
|
||||||
[node name="Gym" type="Node2D"]
|
[node name="Gym" type="Node2D"]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
@ -17,19 +17,19 @@ y_sort_enabled = true
|
||||||
environment = SubResource("Environment_iaiy2")
|
environment = SubResource("Environment_iaiy2")
|
||||||
camera_attributes = SubResource("CameraAttributesPractical_dixrq")
|
camera_attributes = SubResource("CameraAttributesPractical_dixrq")
|
||||||
|
|
||||||
[node name="Node2D" parent="." instance=ExtResource("1_mkpg2")]
|
[node name="player" parent="." instance=ExtResource("1_mkpg2")]
|
||||||
position = Vector2(-832, 87)
|
position = Vector2(490, 44)
|
||||||
floor_constant_speed = true
|
floor_constant_speed = true
|
||||||
|
|
||||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||||
|
|
||||||
[node name="TreeSwamp01Sprt" type="Sprite2D" parent="StaticBody2D"]
|
[node name="TreeSwamp01Sprt" type="Sprite2D" parent="StaticBody2D"]
|
||||||
z_as_relative = false
|
z_as_relative = false
|
||||||
position = Vector2(-832, -601)
|
position = Vector2(0, -993)
|
||||||
scale = Vector2(4.06445, 4.06445)
|
scale = Vector2(4.06445, 4.06445)
|
||||||
texture = ExtResource("2_hscig")
|
texture = ExtResource("2_hscig")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||||
position = Vector2(-783, -40)
|
position = Vector2(-3.8147e-06, -133)
|
||||||
scale = Vector2(4.06445, 4.06445)
|
scale = Vector2(4.06445, 4.06445)
|
||||||
shape = SubResource("RectangleShape2D_bjsqx")
|
shape = SubResource("RectangleShape2D_bjsqx")
|
||||||
|
|
|
@ -23,6 +23,11 @@ func _physics_process(delta):
|
||||||
else:
|
else:
|
||||||
velocity.y = move_toward(velocity.y, 0, SPEED)
|
velocity.y = move_toward(velocity.y, 0, SPEED)
|
||||||
|
|
||||||
|
#if velocity.x > 0:
|
||||||
|
#$AnimationPlayer.play("player_WalkRight")
|
||||||
|
#if velocity.x < 0 :
|
||||||
|
#$AnimationPlayer.play("player_WalkLeft")
|
||||||
|
#if (velocity.x == 0 and velocity.y == 0):
|
||||||
|
#$AnimationPlayer.play("idle")
|
||||||
|
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
852
player.tscn
852
player.tscn
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue