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!/Board/boardsize_worldscaling.gd

10 lines
323 B
GDScript

@tool
extends Control
# Maps from world coordinate space to the board size
func _process(_delta: float) -> void:
var board_screen_size = self.get_rect()
%World.scale = Vector2(board_screen_size.size.x / Globals.SERVER_SIZE.x, board_screen_size.size.y / Globals.SERVER_SIZE.y)
func get_world() -> Node2D:
return %World