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

6 lines
238 B
GDScript

class_name ScalableSprite2D
extends Sprite2D
func scale_sprite(world_space_multiple: float):
var scale_factor = (world_space_multiple * Globals.SERVER_SIZE.x) / self.texture.get_width()
self.scale = Vector2(scale_factor, scale_factor)