Beispiel #1
0
        public void Start()
        {
            var boxController = GetComponent <BoxController>();

            _stateMachineAI = new StateMachineAI();

            var idleState = new IdleState(transform.gameObject);
            var warnState = new WarnState(transform.gameObject, boxController);

            _stateMachineAI.States.Add(idleState);
            _stateMachineAI.States.Add(warnState);

            _stateMachineAI.SetCurrentState("Idle");
        }
        public void Start()
        {
            var roomController = GetComponent <RoomController>();

            _stateMachineAI = new StateMachineAI();

            var waitState     = new WaitState(transform.gameObject);
            var fightState    = new FightState(transform.gameObject, roomController);
            var completeState = new CompleteState();

            _stateMachineAI.States.Add(waitState);
            _stateMachineAI.States.Add(fightState);
            _stateMachineAI.States.Add(completeState);

            _stateMachineAI.SetCurrentState("Wait");
        }