Example #1
0
        public override void Update(Context c, ConditionScriptable conditionScriptable)
        {
            for (int i = 0; i < conditionScriptable.conditions.Count; i++)

            {
            }
        }
Example #2
0
        public override void Update(Context c, ConditionScriptable conditionScriptable)
        {
            for (int i = 0; i < conditionScriptable.conditions.Count; i++)

            {
                if (conditionScriptable.conditions[i].name == "OnExit" && conditionScriptable.conditions[i].isRaised)
                {
                    c.ChangeState(new ExitState());
                    conditionScriptable.Toggle("OnExit");
                }

                if (conditionScriptable.conditions[i].name == "OnGameStart" && conditionScriptable.conditions[i].isRaised)
                {
                    timer -= Time.deltaTime;

                    if (isRaised == false)
                    {
                        FadeUtility.FadeOut(3);
                    }
                    isRaised = true;

                    if (timer < 0)
                    {
                        c.ChangeState(new GameStartState());
                        conditionScriptable.Toggle("OnGameStart");

                        SceneManager.LoadScene("0.main");
                    }
                }
            }
        }
Example #3
0
        public override void Update(Context c, ConditionScriptable conditionScriptable)
        {
            for (int i = 0; i < conditionScriptable.conditions.Count; i++)

            {
                if (conditionScriptable.conditions[i].name == "OnGameEnd" &&
                    conditionScriptable.conditions[i].isRaised)
                {
                    timer -= Time.deltaTime;
                    Debug.Log(timer);
                    if (!fading)
                    {
                        FadeUtility.FadeOut(3);
                        fading = true;
                    }

                    if (timer < 0)
                    {
                        c.ChangeState(new GameEndState());
                        conditionScriptable.Toggle("OnGameEnd");
                        SceneManager.LoadScene("2.End");
                    }
                }
            }
        }
Example #4
0
        public override void Update(Context c, ConditionScriptable conditionScriptable)
        {
            for (int i = 0; i < conditionScriptable.conditions.Count; i++)

            {
                if (conditionScriptable.conditions[i].name == "OnIntroStart" && conditionScriptable.conditions[i].isRaised)
                {
                    c.ChangeState(new IntroStartState());
                    conditionScriptable.Toggle("OnIntroStart");
                }
            }
        }
Example #5
0
 public override void Update(Context c, ConditionScriptable conditions)
 {
     throw new NotImplementedException();
 }
Example #6
0
 public abstract void Update(Context c, ConditionScriptable conditionScriptable);