public override void OnEnter() { int v = GameRunDataHolder.GetType(dataName.Value); if (v == compareValue.Value) { Fsm.Event(equalEvent); } else { Fsm.Event(notEqualEvent); } Finish(); }
public override void OnEnter() { bool v = GameRunDataHolder.GetFlag(flagName.Value); if (v) { Fsm.Event(trueEvent); } else { Fsm.Event(falseEvent); } Finish(); }
void OnGloveConnected() { GameRunDataHolder.SetType("InteractingSource", (int)InteractingSource.VRGlove); Teleporter teleporter = GetComponent <Teleporter>(); if (teleporter != null && model != null) { teleporter.LineDrawer.emittingPoint = model.finger; } VRInteractor interactor = GetComponent <VRInteractor>(); if (interactor != null && model != null) { interactor.acquirePoint = model.finger; transform.Find("Contactor").gameObject.SetActive(false); } }
IEnumerator CheckVRDeviceRoutine() { if (playMode == PlayMode.Auto) { yield return(new WaitForSeconds(0.8f)); if (!IsVRReadyAndConnected()) { isUsingSimulator = true; Destroy(VRBodyRig.gameObject); GlobalEventManager.SendEvent("VRPlayer.PCBodyReady"); GameRunDataHolder.SetType("InteractingSource", (int)InteractingSource.Mouse); } else { isUsingSimulator = false; Destroy(PCSimulatorRig.gameObject); GlobalEventManager.SendEvent("VRPlayer.VRBodyReady"); GameRunDataHolder.SetType("InteractingSource", (int)InteractingSource.VRJoystick); } } else if (playMode == PlayMode.PCSimulator) { isUsingSimulator = true; Destroy(VRBodyRig.gameObject); GlobalEventManager.SendEvent("VRPlayer.PCBodyReady"); GameRunDataHolder.SetType("InteractingSource", (int)InteractingSource.Mouse); } else { isUsingSimulator = false; Destroy(PCSimulatorRig.gameObject); GlobalEventManager.SendEvent("VRPlayer.VRBodyReady"); GameRunDataHolder.SetType("InteractingSource", (int)InteractingSource.VRJoystick); } }
public override void OnEnter() { GameRunDataHolder.SetType(dataName.Value, value.Value); Finish(); }
public override void OnEnter() { GameRunDataHolder.SetFlag(flagName.Value, value.Value); Finish(); }