コード例 #1
0
    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);
        }
    }
コード例 #2
0
 private void Start()
 {
     currentMission = Instantiate(currentMission);
     currentMission.MissionStart(this, character);
 }