24 lines
394 B
GDScript3
24 lines
394 B
GDScript3
|
tool
|
||
|
extends Polygon2D
|
||
|
|
||
|
|
||
|
func _ready():
|
||
|
pass
|
||
|
|
||
|
|
||
|
func update_size(scene: SummerDayScene):
|
||
|
if scene == null:
|
||
|
polygon = PoolVector2Array()
|
||
|
return
|
||
|
polygon = PoolVector2Array(
|
||
|
[
|
||
|
Vector2.ZERO,
|
||
|
Vector2(scene.raw_aspect_ratio, 0.0),
|
||
|
Vector2(scene.raw_aspect_ratio, 1.0),
|
||
|
Vector2(0.0, 1.0)
|
||
|
]
|
||
|
)
|
||
|
|
||
|
func _on_view_transform_changed(new_view_transform):
|
||
|
transform = new_view_transform
|