added project with nerabochie cows

This commit is contained in:
arrrtemida
2025-08-22 17:16:22 +05:00
commit 0d3f195aff
147 changed files with 5060 additions and 0 deletions

View File

@ -0,0 +1,41 @@
extends NodeState
@export var player: Player
@export var animated_sprite_2d : AnimatedSprite2D
@export var speed : int = 50
func _on_process(_delta : float) -> void:
pass
func _on_physics_process(_delta : float) -> void:
var direction : Vector2 = GameInputEvents.movement_input()
if direction == Vector2.UP:
animated_sprite_2d.play("walk_back")
elif direction == Vector2.RIGHT:
animated_sprite_2d.play("walk_right")
elif direction == Vector2.DOWN:
animated_sprite_2d.play("walk_front")
elif direction == Vector2.LEFT:
animated_sprite_2d.play("walk_left")
if direction != Vector2.ZERO:
player.player_direction = direction
player.velocity = direction * speed
player.move_and_slide()
func _on_next_transitions() -> void:
if !GameInputEvents.is_movement_input():
transition.emit("Idle")
func _on_enter() -> void:
pass
func _on_exit() -> void:
animated_sprite_2d.stop()