public override void Update(Context c, ConditionScriptable conditionScriptable) { for (int i = 0; i < conditionScriptable.conditions.Count; i++) { } }
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"); } } } }
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"); } } } }
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"); } } }
public override void Update(Context c, ConditionScriptable conditions) { throw new NotImplementedException(); }
public abstract void Update(Context c, ConditionScriptable conditionScriptable);