void Start() { TrinusProcessor.UserSettings settings = TrinusProcessor.getUserSettings(); settings.forcedIP = IPAddress; settings.yawScale = yawScale; settings.videoPort = videoPort; settings.sensorPort = sensorPort; IEnumerator <string> e = TrinusProcessor.LensParams.getPresetNames().GetEnumerator(); e.MoveNext(); settings.lensParams.selectPreset(e.Current); trinusProcessor.applyLensParams(); startConnection(); }
// Use this for initialization void Awake() { trinusProcessor = GameObject.Find("TrinusManager").GetComponent <TrinusProcessor> (); trinusMessage = transform.Find("TrinusMessage").GetComponent <Text> (); GameObject trinusUI = GameObject.Find("TrinusUI"); if (trinusUI != null) { trinusUI.SetActive(false); } TrinusProcessor.setMessageCallbacks(setMessage, setHint, setHint); canvas = GetComponent <Canvas> (); }
// Use this for initialization void Start() { trinusUI.showQuitButton(true); trinusProcessor = GameObject.Find("TrinusManager").GetComponent <TrinusProcessor> (); if (trinusProcessor == null || !trinusProcessor.isStreaming()) { Time.timeScale = 0; trinusUI.openIntro(); } else { trinusUI.openGame(); } //Cursor.visible = false; canvas = trinusUI.GetComponent <Canvas> (); }
public void Awake() { trinusProcessor = GameObject.Find("TrinusManager").GetComponent <TrinusProcessor> (); GameObject tc = GameObject.Find("TrinusUI"); if (tc != null) { TrinusUI tui = tc.GetComponent <TrinusUI> (); //these can be set from the Editor, just putting them here for a quick set up tui.connectedEvent.AddListener(() => this.trinusEventConnected()); //we can display the game UI once Trinus is ready tui.disconnectedEvent.AddListener(() => this.trinusEventDisconnected()); //on disconnect, let's go back to main menu tui.finishedSettingsEvent.AddListener(() => this.trinusEventSettingsFinished()); //show the game pause settings UI when closing the Trinus settings UI } canvas = GetComponent <Canvas> (); transform.Find("InitialUI").gameObject.SetActive(true); }
public void startConnection() { trinusProcessor.resetDisconnectStatus(); TrinusProcessor.trinusPause(false); }