void Update() { if (prevstate != MG_StateManager.state) { prevstate = MG_StateManager.state; SetContents(prevstate); } switch (prevstate) { case MG_StateManager.States.Ready: Ready(); break; case MG_StateManager.States.Gameplay: GamePlay(); break; case MG_StateManager.States.Replay: Replay(); break; } SliderMat.SetFloat("_Slider", TL_TimeLineMng.ctime / TL_TimeLineMng.GetTimelim()); }
void Start() { prevstate = MG_StateManager.States.Ready; T = gameObject.transform; defpos = T.localPosition; if (hasAC) { ac = GetComponent <Animator>(); } setpos(); }
void SetContents(MG_StateManager.States tgt) { CLearContents(); switch (tgt) { case MG_StateManager.States.Ready: Setv(ReadyParent, 0, 2); break; case MG_StateManager.States.Gameplay: Setv(GPParent, 0, 2); break; case MG_StateManager.States.Replay: Setv(ReplayParent, 0, 2); break; } }
void setpos() { prevstate = MG_StateManager.state; if (prevstate == MG_StateManager.States.Ready) { if (hasAC) { ac.enabled = true; } T.localPosition = defpos; } else { if (hasAC) { ac.enabled = false; } Clapper.Setv(T, 108888888, 2); } }