void Update() { if (curState.CheckExit()) { NextState(); if (curState == null) { tGui.gameObject.SetActive(false); gameObject.SetActive(false); return; } } curState.sUpdate(); }