예제 #1
0
        //Set our combat behaviour.  If we are not using an override behaviour, start or restart the appropriate behaviour.
        public void SetCombatBehaviour(CustomAIBehaviour c)
        {
            combatBehaviour = c;

            if (canOverrideBehaviour)
            {
                SetBehaviour();
            }
        }
예제 #2
0
        //Set our idle behaviour.  If we are not using an override behaviour, start or restart the appropriate behaviour.
        public void SetIdleBehaviour(CustomAIBehaviour c)
        {
            idleBehaviour = c;

            if (canOverrideBehaviour)
            {
                SetBehaviour();
            }
        }
예제 #3
0
        void SetCurrentBehaviour(CustomAIBehaviour b)
        {
            //Call OnEndBehaviour on the behaviour we are replacing, if any.
            //This lets us perform any cleanup operations
            //For example, marking a cover location as "free"
            if (currentBehaviour && canOverrideBehaviour)
            {
                currentBehaviour.OnEndBehaviour();
            }

            currentBehaviour = b;
        }
예제 #4
0
        public void SetOverrideBehaviour(CustomAIBehaviour c, bool b)
        {
            //Only override behaviours if we don't already have an override behaviour.
            if (canOverrideBehaviour)
            {
                usingOverrideBehaviour = true;
                if (currentBehaviour)
                {
                    currentBehaviour.OnEndBehaviour();
                }

                canOverrideBehaviour = !b;
                currentBehaviour     = c;
            }
        }
예제 #5
0
        void SetCurrentBehaviour(CustomAIBehaviour b)
        {
            //Call OnEndBehaviour on the behaviour we are replacing, if any.
            //This lets us perform any cleanup operations
            //For example, marking a cover location as "free"
            if(currentBehaviour && canOverrideBehaviour){
            currentBehaviour.OnEndBehaviour();
            }

            currentBehaviour = b;
        }
예제 #6
0
        public void SetOverrideBehaviour(CustomAIBehaviour c, bool b)
        {
            //Only override behaviours if we don't already have an override behaviour.
            if(canOverrideBehaviour)
            {
                usingOverrideBehaviour = true;
                if(currentBehaviour)
                    currentBehaviour.OnEndBehaviour();

                canOverrideBehaviour = !b;
                currentBehaviour = c;
            }
        }
예제 #7
0
        //Set our idle behaviour.  If we are not using an override behaviour, start or restart the appropriate behaviour.
        public void SetIdleBehaviour(CustomAIBehaviour c)
        {
            idleBehaviour = c;

            if(canOverrideBehaviour)
            SetBehaviour();
        }
예제 #8
0
        //Set our combat behaviour.  If we are not using an override behaviour, start or restart the appropriate behaviour.
        public void SetCombatBehaviour(CustomAIBehaviour c)
        {
            combatBehaviour = c;

            if(canOverrideBehaviour)
            SetBehaviour();
        }