Archived
1
0
Fork 0
This repository has been archived on 2026-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
Danmaku/client/danmaku!/player.gd

17 lines
337 B
GDScript

extends Node2D
@export var speed = 400
var velocity = 0
func get_input():
if Input.is_action_pressed("Slow Mode"):
speed = 200
else:
speed = 400
var input_direction = Input.get_vector("Left", "Right", "Up", "Down")
velocity = input_direction * speed
func _physics_process(delta):
get_input()
position += velocity * delta