public override void OnGameStart() { curStateObject = GetNewStateObject(state); curStateObject.Init(actor, this); curStateObject.disableParticle = true; curStateObject.Enter(); curStateObject.disableParticle = false; }
public virtual void SwitchState(ElementState newState) { Debug.Log("Enter to ElementState:" + newState); state = newState; curStateObject.Exit(); curStateObject = GetNewStateObject(state); curStateObject.Init(actor, this); curStateObject.Enter(); }