|
@ -3,8 +3,6 @@ extends Node2D |
|
|
@export var zoom_increment: Vector2 = Vector2(0.1, 0.1) |
|
|
@export var zoom_increment: Vector2 = Vector2(0.1, 0.1) |
|
|
@export var move_speed: int = 250 |
|
|
@export var move_speed: int = 250 |
|
|
|
|
|
|
|
|
var mouse: Vector2 = Vector2.ZERO |
|
|
|
|
|
|
|
|
|
|
|
@onready var camera: Camera2D = $Camera2D |
|
|
@onready var camera: Camera2D = $Camera2D |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -15,8 +13,6 @@ func _process(delta: float) -> void: |
|
|
|
|
|
|
|
|
position += Vector2(velocity_x, velocity_y) |
|
|
position += Vector2(velocity_x, velocity_y) |
|
|
|
|
|
|
|
|
mouse = Vector2() |
|
|
|
|
|
|
|
|
|
|
|
func _unhandled_input(event: InputEvent) -> void: |
|
|
func _unhandled_input(event: InputEvent) -> void: |
|
|
if event.is_action_pressed("Zoom In"): |
|
|
if event.is_action_pressed("Zoom In"): |
|
|
camera.zoom += zoom_increment |
|
|
camera.zoom += zoom_increment |
|
|