public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); agent = character.GetComponent<NavMeshAgent>(); agent.CalculatePath(TargetPosition, path); }
public void Update() { if (DebugAI) { AI_Mission_Base mission = DebugAI.currentMission; if (mission != null) { CurrentMissionText.text = mission.ToString(); if (mission.GetCurrentAction() != null) { ActionListText[0].text = mission.GetCurrentAction().ToString(); } for (int i = 1; i < ActionListText.Length; i++) { if (i <= mission.ActionList.Count) { ActionListText[i].text = mission.ActionList[i - 1].ToString(); ActionListText[i].color = new Color(0.3f, 0.3f, 0.3f); } else { ActionListText[i].text = ""; } } } } }
public override void MissionAbort(AI_Base brain, Character_Base character, AI_Mission_Base newMission) { base.MissionAbort(brain, character, newMission); if (TargetItem) { TargetItem.ReleaseSlot(ownerCharacter); } }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); if (character.canAttack()) { character.AttackCommand(TargetTransform.position - Character.transform.position); ActionFinish(); } }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); if (Item) { Item.InteractStart(character); timer = Duration; isInteracting = true; Behaviour b = character.StartBehaviour(new Behaviour(AnimationName, Duration, BehaviourType.Interact, new float[] {})); b.BehaviourFinishEvent += OnBehaviourFinish; } }
public void StartNewMission(AI_Mission_Base mission, int Priority = 0) { mission.Priority = Priority; int oldPriority = -1; if (currentMission != null) { oldPriority = currentMission.Priority; } if (Priority > oldPriority) { if (currentMission != null) { currentMission.MissionAbort(this, character, mission); } currentMission = mission; currentMission.MissionStart(this, character); } }
public void MissionEnd(AI_Mission_Base mission, bool result) { currentMission = null; GetNewMission(); }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); Check(character); }
public virtual void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { Mission = mission; }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); timer = MinDuration; }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); perception = character.GetComponentInChildren <AIPerception>(); Character = character; }
private void Start() { currentMission = Instantiate(currentMission); currentMission.MissionStart(this, character); }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); character.JumpStart(character.transform.position, Duration, 0.75f, ""); }
public virtual void MissionAbort(AI_Base brain, Character_Base character, AI_Mission_Base newMission) { currentAction.ActionInterrupt(brain, character); BeforeExit(); }
public virtual void MissionAbort(AI_Base brain, Character_Base character, AI_Mission_Base newMission) { }