public void ChangeState(CrystalCarState state, Fsm targetFsm) { currentFsm.OnExit(); this.state = state; currentFsm = targetFsm; currentFsm.OnEnter(); DebugUtils.LogWarning(DebugUtils.Type.AI_CrystalCar, string.Format(" {0}'s crystal car {1} enter state {2} ", mark, id, this.state)); }
public override void Reset() { id = -1; state = CrystalCarState.NONE; town = null; hp = 0; maxHp = 0; damage = 0; transform.position = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue); transform.rotation = Quaternion.identity; PostRenderMessage = null; PostDestroy = null; FindOpponentSoldiers = null; FindOpponentCrystal = null; }