public void Update() { //InputMgr.UpdateFrame(); SVMMgr.UpdateFrame(); VRMgr.UpdateFrame(); TriggerMgr.UpdateFrame(); }
public void TriggerListener(string rType, object rData) { if (!isActiveAndEnabled) { return; } TriggerMgr.Trigger(rType, rData); }
public void AddListener(string rMessageType, Callback <object> callback) { if (!isActiveAndEnabled) { return; } TriggerMgr.Add(rMessageType, callback); }
void Awake() { instance = this; timer = GetComponent<WorldTimer>(); noteRef = GetComponent<WorldNoteRef>(); memory = GetComponent<Memory>(); cardPool = GetComponent<CardPool>(); triggerMgr = GetComponent<TriggerMgr>(); cardCanvas = _cardCanvas; eventCanvas = _eventCanvas; }
public override void OnExit() { base.OnExit(); cameraPosition = CameraMgr.position; cameraRotation = CameraMgr.rotation; ResourceMgr.ToggleAllGameObjects(false); CameraMgr.UseDefaultSkybox(); foreach (string cloneUUID in triggers) { TriggerMgr.ToggleTrigger(cloneUUID, false); } }
private static void JSEditorDeleteTrigger(string _activity, string _params) { try { JSONNode root = JSON.Parse(_params); string uuid = root["uuid"].Value; TriggerMgr.DeleteEditorSightTrigger(uuid); EditorMgr.RemoveTrigger(uuid); } catch (System.Exception e) { onNotify("Parse json has error: " + e.Message); } }
private static void JSEditorModifyGazeIcon(string _activity, string _params) { try { JSONNode root = JSON.Parse(_params); string uuid = root["uuid"].Value; int icon = root["icon"].AsInt; TriggerMgr.ModifyGazeIcon(uuid, icon); } catch (System.Exception e) { onNotify("Parse json has error: " + e.Message); } }
public override void OnEnter() { base.OnEnter(); CameraMgr.Place(cameraPosition); CameraMgr.Euler(cameraRotation); Debug.Log(skybox); if (null != skybox) { CameraMgr.ApplySkybox(skybox); } ResourceMgr.ToggleGameObjects(objs.ToArray(), true); foreach (string cloneUUID in triggers) { TriggerMgr.ToggleTrigger(cloneUUID, true); } }
private static void JSEditorFocusTrigger(string _activity, string _params) { try { JSONNode root = JSON.Parse(_params); string uuid = root["uuid"].Value; string type = root["type"].Value; if (type.Equals("sight")) { TriggerMgr.FocusSightTrigger(uuid); } } catch (System.Exception e) { onNotify("Parse json has error: " + e.Message); } }
private static void JSEditorModifyGazeColor(string _activity, string _params) { try { JSONNode root = JSON.Parse(_params); string uuid = root["uuid"].Value; int r = root["r"].AsInt; int g = root["g"].AsInt; int b = root["b"].AsInt; int a = root["a"].AsInt; TriggerMgr.ModifyGazeColor(uuid, r, g, b, a); } catch (System.Exception e) { onNotify("Parse json has error: " + e.Message); } }
private static void JSEditorAdjustTrigger(string _activity, string _params) { try { JSONNode root = JSON.Parse(_params); string uuid = root["uuid"].Value; string type = root["type"].Value; if (type.Equals("sight")) { TriggerMgr.AdjustSightTrigger(uuid); Vector3 position = TriggerMgr.QueryTriggerPosition(uuid); Vector3 rotation = TriggerMgr.QueryTriggerRotation(uuid); MessageToJS("JSOnEditorAdjustTrigger", _activity, string.Format("{{\"px\":{0}, \"py\":{1}, \"pz\":{2}, \"rx\":{3}, \"ry\":{4}, \"rz\":{5}}}", position.x, position.y, position.z, rotation.x, rotation.y, rotation.z)); } } catch (System.Exception e) { onNotify("Parse json has error: " + e.Message); } }
public override void OnDestroy() { base.OnDestroy(); TriggerMgr.Clear(); }
private void preloadTriggerManager() { this.LogTrace("preload Trigger manager..."); TriggerMgr.Preload(); }