30 lines
629 B
GDScript3
30 lines
629 B
GDScript3
extends Camera2D
|
|
|
|
|
|
# Declare member variables here. Examples:
|
|
# var a: int = 2
|
|
# var b: String = "text"
|
|
|
|
signal enter_portal
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
#func _process(delta: float) -> void:
|
|
# pass
|
|
|
|
|
|
func _on_PortalDarkForest_body_entered(body: Node) -> void:
|
|
self.limit_bottom = -224
|
|
self.limit_top = -736
|
|
self.limit_left = -32
|
|
self.limit_right = 448
|
|
var player = get_parent()
|
|
player.position = Vector2(256,-232)
|
|
emit_signal('enter_portal')
|
|
|