Пример #1
0
        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));
        }
Пример #2
0
        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;
        }