super_space_game/scripts/player_ground.gd
2025-12-02 14:51:40 -05:00

9 lines
299 B
GDScript

extends CharacterBody2D
func _process(delta: float) -> void:
var horizontial_movement = Input.get_axis("ground_left", "ground_right")
var vertical_movement = Input.get_axis("ground_up", "ground_down")
velocity = Vector2(256 * horizontial_movement, 256 * vertical_movement)
move_and_slide()