//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(); } }
//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(); } }
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; }
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; } }
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; }
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; } }
//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(); }
//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(); }