-
Notifications
You must be signed in to change notification settings - Fork 4
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
570fcd4
commit c2a67f5
Showing
2 changed files
with
13 additions
and
7 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
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,15 +1,23 @@ | ||
extends Spatial | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
# Starts looking for available | ||
# Tilt Five glasses to use | ||
# It will signal glasses_available | ||
# when they are found | ||
if $T5Manager.start_service(): | ||
print("Service started") | ||
|
||
|
||
func _on_T5Manager_glasses_available(): | ||
# This will reserve the first pair of | ||
# glasses it can for use. It will signal | ||
# glasses_reserved when done | ||
$T5Manager.reserve_glasses() | ||
|
||
func _on_T5Manager_glasses_reserved(success): | ||
# The result of calling reserve_glasses() | ||
# If successful then the glasses may be | ||
# rendered to by setting the viewport | ||
# arvr flag | ||
if success: | ||
get_viewport().arvr = true |