21 lines
482 B
GDScript
21 lines
482 B
GDScript
extends CanvasLayer
|
|
|
|
@export var show_cat := false
|
|
@export var show_cat_duration := 3.0
|
|
|
|
@onready var cat := $TextureCat as TextureRect
|
|
|
|
|
|
func _ready():
|
|
offset = Vector2.ZERO
|
|
visible = true
|
|
await get_parent().ready
|
|
# 盒子猫镜头左右各增加边框宽度
|
|
var camera = SceneManager.get_camera_marker()
|
|
camera.limit_left -= 100
|
|
camera.limit_right += 100
|
|
if show_cat:
|
|
create_tween().tween_property(cat, "modulate:a", 0.0, show_cat_duration)
|
|
else:
|
|
cat.visible = false
|