Esempio n. 1
0
    private void Start()
    {
        #region load json data


        string json_folder = path_json;

        //var jtc3 = LoadJsonFile<Dialog_01>(Application.dataPath + json_folder, "NanAndJo");

        //jtc3.DebugParsing();


        #endregion

        //get string txt from json file
        string      jsonString     = File.ReadAllText(Application.dataPath + json_folder + "/NanAndJo.json");
        triggerList triggerList_01 = JsonUtility.FromJson <triggerList>(jsonString);

        Dialog_list _Dialog_01 = JsonUtility.FromJson <Dialog_list>(jsonString);

        Debug.Log("trigger list의 갯수" + triggerList_01.trigger.Length);


        //copy for debugging
        triggertest_01 = triggerList_01;
        debug_dialogs  = _Dialog_01;
    }
Esempio n. 2
0
 public rubeState transition(triggerList message)
 {
     if (message == triggerList.targetHit)
     {
         return(rubeState.targetDestroyed);
     }
     return(this.toEnum());
 }
Esempio n. 3
0
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.finalCameraPos)
            {
                return(rubeState.moveCameraToFinalPos);
            }

            return(rubeState.buttonPressed);
        }
Esempio n. 4
0
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.wallDestroyed)
            {
                return(rubeState.wallDestroyed);
            }

            return(rubeState.catapultFired);
        }
Esempio n. 5
0
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.buttonPressed)
            {
                return(rubeState.buttonPressed);
            }

            return(rubeState.wallDestroyed);
        }
Esempio n. 6
0
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.ballFell)
            {
                return(rubeState.dominoStart);
            }

            return(rubeState.started);
        }
Esempio n. 7
0
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.catapultStart)
            {
                return(rubeState.catapultFired);
            }

            return(rubeState.dominoStart);
        }
Esempio n. 8
0
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.started)
            {
                return(rubeState.started);
            }

            return(rubeState.init);
        }
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.started)
            {
                return rubeState.started;
            }

            return rubeState.init;
        }
 /// <summary>
 /// Used by machineTriggers to notify the manager of criteria being met.
 /// This signal is then sent to the FSM, which performs the appropriate
 /// transition
 /// </summary>
 /// <param name="message">The "input" that the FSM is meant to respond to
 /// </param>
 public void receiveControl(triggerList message)
 {
     theFSM.handleTrigger(message);
     updateSubs();
 }
 /// <summary>
 /// Handles input sent from the controller by using the state's
 /// transition function.
 /// </summary>
 /// <param name="message">the trigger that the FSM should respond to
 /// </param>
 public void handleTrigger(triggerList message)
 {
     currentState = stateList[currentState.transition(message)];
 }
Esempio n. 12
0
 /// <summary>
 /// Handles input sent from the controller by using the state's
 /// transition function.
 /// </summary>
 /// <param name="message">the trigger that the FSM should respond to
 /// </param>
 public void handleTrigger(triggerList message)
 {
     currentState = stateList[currentState.transition(message)];
 }
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.catapultStart)
            {
                return rubeState.catapultFired;
            }

            return rubeState.dominoStart;
        }
        public rubeState transition(triggerList message)
        {
            if (message == triggerList.wallDestroyed)
            {
                return rubeState.wallDestroyed;
            }

            return rubeState.catapultFired;
        }
 public rubeState transition(triggerList message)
 {
     return this.toEnum();
 }
 public rubeState transition(triggerList message)
 {
     if(message == triggerList.targetHit)
     {
         return rubeState.targetDestroyed;
     }
     return this.toEnum();
 }
        public rubeState transition(triggerList message)
        {
            if(message == triggerList.finalCameraPos)
            {
                return rubeState.moveCameraToFinalPos;
            }

            return rubeState.buttonPressed;
        }
Esempio n. 18
0
 public rubeState transition(triggerList message)
 {
     return(this.toEnum());
 }
        public rubeState transition(triggerList message)
        {
            if(message == triggerList.ballFell)
            {
                return rubeState.dominoStart;
            }

            return rubeState.started;
        }
        public rubeState transition(triggerList message)
        {
            if(message == triggerList.buttonPressed)
            {
                return rubeState.buttonPressed;
            }

            return rubeState.wallDestroyed;
        }
 /// <summary>
 /// Used by machineTriggers to notify the manager of criteria being met.
 /// This signal is then sent to the FSM, which performs the appropriate
 /// transition
 /// </summary>
 /// <param name="message">The "input" that the FSM is meant to respond to
 /// </param>
 public void receiveControl(triggerList message)
 {
     theFSM.handleTrigger(message);
     updateSubs();
 }