Beispiel #1
0
        /// <summary>
        /// Creates a batch of <c>Level</c>s and adds them to this <c>World</c>. This function will save you
        /// a lot of time - instead of creating many levels one by one, you can create them all at once.
        /// </summary>
        /// <param name="numLevels">The number of <c>Level</c>s to be added to this <c>World</c>.</param>
        /// <param name="scoreTemplate"><c>Score</c> template for the <c>Level</c>s.</param>
        /// <param name="missionTemplate"><c>Mission</c> template for the <c>Level</c>s.</param>
        public void BatchAddDependentLevelsWithTemplates(int numLevels, Score scoreTemplate, Mission missionTemplate)
        {
            List <Score> scoreTemplates = new List <Score>();

            if (scoreTemplate != null)
            {
                scoreTemplates.Add(scoreTemplate);
            }
            List <Mission> missionTemplates = new List <Mission>();

            if (missionTemplate != null)
            {
                missionTemplates.Add(missionTemplate);
            }

            BatchAddDependentLevelsWithTemplates(numLevels, scoreTemplates, missionTemplates);
        }
Beispiel #2
0
 /// <summary>
 /// Adds the given <c>Mission</c> to this <c>World</c>.
 /// </summary>
 /// <param name="mission">Mission to be added.</param>
 public void AddMission(Mission mission)
 {
     Missions.Add(mission);
 }
Beispiel #3
0
 /// <summary>
 /// Determines if the given <c>Mission</c> is complete.
 /// </summary>
 /// <returns>If the given <c>Mission</c> is completed returns <c>true</c>;
 /// otherwise <c>false</c>.</returns>
 /// <param name="mission"><c>Mission</c> to determine if complete.</param>
 public static bool IsCompleted(Mission mission)
 {
     return(GetTimesCompleted(mission) > 0);
 }
Beispiel #4
0
 public static int GetTimesCompleted(Mission mission)
 {
     return(instance._getTimesCompleted(mission));
 }
Beispiel #5
0
 public static void SetCompleted(Mission mission, bool completed, bool notify)
 {
     instance._setCompleted(mission, completed, notify);
 }
Beispiel #6
0
        /** The following functions call the relevant instance-specific functions. **/

        public static void SetCompleted(Mission mission, bool completed)
        {
            SetCompleted(mission, completed, true);
        }