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); } }
private void Start() { currentMission = Instantiate(currentMission); currentMission.MissionStart(this, character); }