コード例 #1
0
        protected override void ConfigureStates()
        {
            states = new IEnumerator[7];

            //flank
            states[0] = AIStates.CalculateFlank(blackboardReference, manager.components);
            states[1] = AIStates.GotoPosition(blackboardReference, 0, 8, manager.components, 6);
            states[2] = AIStates.GotoPosition(blackboardReference, 1, 8, manager.components, 6);

            //attack
            states[3] = AIStates.GotoPlayer(blackboardReference, blackboardReference.distanceToPlayer > blackboardReference.closeAttackRange ? 8 : 4, manager.components);
            states[4] = AIStates.StandAndShootPlayer(blackboardReference, manager.components);

            //Tactically place
            states[5] = AIStates.GotoCover(blackboardReference, manager.components, 4, true, 0, true);

            //re attack
            states[6] = AIStates.StandAndShootPlayer(blackboardReference, manager.components);
        }
コード例 #2
0
        public void EvaluateTransitions()
        {
            for (int i = 0; i < transitions.Length; ++i)
            {
                AITransition transition = transitions[i];

                if (transition.currentState != currentState)
                {
                    continue;
                }

                bool evaluation = AIStates.CheckBoleanCondition(transition, blackboardReference, manager.components);

                if (evaluation)
                {
                    TransitionState(transition.jumpIndex);
                    break;
                }
            }
        }
コード例 #3
0
 protected override void ConfigureStates()
 {
     states    = new IEnumerator[2];
     states[0] = AIStates.GotoPlayer(blackboardReference, 8, manager.components);
     states[1] = AIStates.StandardAttack(blackboardReference, manager.components);
 }