예제 #1
0
 public void Update()
 {
     //InputMgr.UpdateFrame();
     SVMMgr.UpdateFrame();
     VRMgr.UpdateFrame();
     TriggerMgr.UpdateFrame();
 }
예제 #2
0
 public void TriggerListener(string rType, object rData)
 {
     if (!isActiveAndEnabled)
     {
         return;
     }
     TriggerMgr.Trigger(rType, rData);
 }
예제 #3
0
 public void AddListener(string rMessageType, Callback <object> callback)
 {
     if (!isActiveAndEnabled)
     {
         return;
     }
     TriggerMgr.Add(rMessageType, callback);
 }
예제 #4
0
 void Awake()
 {
     instance = this;
     timer = GetComponent<WorldTimer>();
     noteRef = GetComponent<WorldNoteRef>();
     memory = GetComponent<Memory>();
     cardPool = GetComponent<CardPool>();
     triggerMgr = GetComponent<TriggerMgr>();
     cardCanvas = _cardCanvas;
     eventCanvas = _eventCanvas;
 }
예제 #5
0
 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);
     }
 }
예제 #6
0
 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);
     }
 }
예제 #7
0
        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);
            }
        }
예제 #8
0
 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);
     }
 }
예제 #9
0
        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);
            }
        }
예제 #10
0
        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);
            }
        }
예제 #11
0
        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);
            }
        }
예제 #12
0
 public override void OnDestroy()
 {
     base.OnDestroy();
     TriggerMgr.Clear();
 }
예제 #13
0
 private void preloadTriggerManager()
 {
     this.LogTrace("preload Trigger manager...");
     TriggerMgr.Preload();
 }