super_space_game/scripts/player_ground.gd

10 lines
299 B
GDScript3
Raw Normal View History

2025-12-02 19:51:40 +00:00
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()