-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
997e5b2
commit 809c6ec
Showing
1 changed file
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
# Add this Sript in a child of anything that you want the camera to be able to follow, if there is | ||
# more than one candidate on your level use the cameraF_change_candidate(step_int) signal to change | ||
# what is the camera following | ||
# Add this Sript in a child of anything that you want the camera to be able to follow, if there is | ||
# more than one candidate on your level use the cameraF_change_candidate(step_int) signal to change | ||
# what is the camera following | ||
|
||
extends Node | ||
|
||
|
||
# If I enter the tree I can get followed by camera | ||
func _enter_tree() -> void: | ||
get_parent().add_to_group("CameraFCandidates") | ||
EventBus.emit_signal("cameraF_candidate_spawned") | ||
|
||
|
||
# If I exit the tree I can no longer get followed by camera | ||
func _exit_tree() -> void: | ||
get_parent().remove_from_group("CameraFCandidates") |