13 lines
313 B
GDScript
13 lines
313 B
GDScript
|
|
extends Camera2D
|
||
|
|
|
||
|
|
func _process(delta):
|
||
|
|
const speed = 300.0
|
||
|
|
if Input.is_key_pressed(KEY_W):
|
||
|
|
position.y -= delta * speed
|
||
|
|
if Input.is_key_pressed(KEY_S):
|
||
|
|
position.y += delta * speed
|
||
|
|
if Input.is_key_pressed(KEY_A):
|
||
|
|
position.x -= delta * speed
|
||
|
|
if Input.is_key_pressed(KEY_D):
|
||
|
|
position.x += delta * speed
|