Exemplo n.º 1
0
 public void LoadAvailableMissions(Mission newMission)
 {
     newMission.RegisterMissionCompleteCallback(CompleteMission);
     availableMissions.Add(newMission);
 }
Exemplo n.º 2
0
    Mission MissionGenerator()
    {
        Mission newMission = new Mission();

        // 50 / 50 chance of generating a Science or a Survival mission
        int select = Random.Range(0, 4);
        if (select == 0 || select == 2)
        {
            // Grab a Science mission from the database
            newMission = mission_database.GetMission(MissionType.SCIENCE);
        }
        else
        {
            // Get a Survival mission from the database
            newMission = mission_database.GetMission(MissionType.SURVIVAL);
        }

        //// *** FOR TESTING I AM FORCING MISSIONS!
        //newMission = mission_database.GetMission(MissionType.SCIENCE);

        // Set its Complete Mission callback...
        newMission.RegisterMissionCompleteCallback(CompleteMission);

        // ... before returning.
        return newMission;

        //ENCOUNTER Type missions should be generated through some other logic that decides when a boss fight should happen
    }
Exemplo n.º 3
0
 public void LoadActiveMission(Mission newMission)
 {
     newMission.RegisterMissionCompleteCallback(CompleteMission);
     activeMission = newMission;
     Debug.Log("MISSION MANAGER: current active mission is " + activeMission.MissionName);
 }