Added item and interact animations
This commit is contained in:
@@ -62,6 +62,20 @@ public partial class Player2D : CharacterBody2D
|
||||
_lastDirection = Vector2.Down;
|
||||
}
|
||||
|
||||
if (Input.IsActionPressed("interact2"))
|
||||
{
|
||||
_sprite.Animation = "back interact";
|
||||
anyActionPressed = true;
|
||||
_lastDirection = Vector2.Up;
|
||||
}
|
||||
|
||||
if (Input.IsActionPressed("item"))
|
||||
{
|
||||
_sprite.Animation = "diagonal item";
|
||||
anyActionPressed = true;
|
||||
_lastDirection = Vector2.Right;
|
||||
}
|
||||
|
||||
if (anyActionPressed)
|
||||
{
|
||||
_sprite.Play();
|
||||
|
||||
Reference in New Issue
Block a user