Godot version of Conway's game of life
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

21 lines
608 B

extends Camera2D
@export var move_speed: int = 250
@export var zoom_increment: Vector2 = Vector2(0.1, 0.1)
func _process(delta: float) -> void:
var input_dir := Input.get_vector("Left", "Right", "Up", "Down")
var velocity_y = input_dir.y * move_speed * delta
var velocity_x = input_dir.x * move_speed * delta
position += Vector2(velocity_x, velocity_y)
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("Reset Zoom"):
zoom = Vector2.ONE
if event.is_action_pressed("Zoom In"):
zoom += zoom_increment
if event.is_action_pressed("Zoom Out"):
zoom -= zoom_increment