RhythmGame/scripts/ScreenFilter.gd

10 lines
322 B
GDScript3
Raw Normal View History

extends Node2D
func _draw():
var screen_size = $"/root".get_visible_rect().size
var screen_height = max(screen_size.x, screen_size.y)
draw_rect(Rect2(-screen_height/2, -screen_height/2, screen_height, screen_height), GameTheme.screen_filter)
func _ready():
2020-03-12 23:05:12 +10:30
GameTheme.connect("screen_filter_changed", self, "update")