예제 #1
0
 public MapData(AreaKey area)
 {
     this.Area     = area;
     this.Data     = AreaData.Areas[this.Area.ID];
     this.ModeData = this.Data.Mode[(int)this.Area.Mode];
     this.Load();
 }
예제 #2
0
 public Session(AreaKey area, string checkpoint = null, AreaStats oldStats = null)
     : this()
 {
     this.Area            = area;
     this.StartCheckpoint = checkpoint;
     this.ColorGrade      = this.MapData.Data.ColorGrade;
     this.Dreaming        = AreaData.Areas[area.ID].Dreaming;
     //this.Inventory = AreaData.GetCheckpointInventory(area, checkpoint);
     this.CoreMode   = AreaData.Areas[area.ID].CoreMode;
     this.FirstLevel = true;
     //this.Audio = this.MapData.ModeData.AudioState.Clone();
     if (this.StartCheckpoint == null)
     {
         this.Level = this.MapData.StartLevel().Name;
         this.StartedFromBeginning = true;
     }
     else
     {
         this.Level = this.StartCheckpoint;
         this.StartedFromBeginning = false;
         this.Dreaming             = AreaData.GetCheckpointDreaming(area, checkpoint);
         this.CoreMode             = AreaData.GetCheckpointCoreMode(area, checkpoint);
         //AudioState checkpointAudioState = AreaData.GetCheckpointAudioState(area, checkpoint);
         //if (checkpointAudioState != null)
         //{
         //    if (checkpointAudioState.Music != null)
         //        this.Audio.Music = checkpointAudioState.Music.Clone();
         //    if (checkpointAudioState.Ambience != null)
         //        this.Audio.Ambience = checkpointAudioState.Ambience.Clone();
         //}
         string checkpointColorGrading = AreaData.GetCheckpointColorGrading(area, checkpoint);
         if (checkpointColorGrading != null)
         {
             this.ColorGrade = checkpointColorGrading;
         }
         CheckpointData checkpoint1 = AreaData.GetCheckpoint(area, checkpoint);
         if (checkpoint1 != null && checkpoint1.Flags != null)
         {
             foreach (string flag in checkpoint1.Flags)
             {
                 this.SetFlag(flag, true);
             }
         }
     }
     //if (oldStats != null)
     //    this.OldStats = oldStats;
     //else
     //    this.OldStats = SaveData.Instance.Areas[this.Area.ID].Clone();
 }
예제 #3
0
 public static CheckpointData GetCheckpoint(AreaKey area, string level)
 {
     CheckpointData[] checkpoints = AreaData.Areas[area.ID].Mode[(int)area.Mode].Checkpoints;
     if (level != null && checkpoints != null)
     {
         foreach (CheckpointData checkpointData in checkpoints)
         {
             if (checkpointData.Level.Equals(level))
             {
                 return(checkpointData);
             }
         }
     }
     return((CheckpointData)null);
 }
예제 #4
0
 public static string GetCheckpointColorGrading(AreaKey area, string level)
 {
     return(AreaData.GetCheckpoint(area, level)?.ColorGrade);
 }
예제 #5
0
        public static Session.CoreModes GetCheckpointCoreMode(AreaKey area, string level)
        {
            CheckpointData checkpoint = AreaData.GetCheckpoint(area, level);

            return(checkpoint != null && checkpoint.CoreMode.HasValue ? checkpoint.CoreMode.Value : AreaData.Areas[area.ID].CoreMode);
        }
예제 #6
0
        public static bool GetCheckpointDreaming(AreaKey area, string level)
        {
            CheckpointData checkpoint = AreaData.GetCheckpoint(area, level);

            return(checkpoint != null ? checkpoint.Dreaming : AreaData.Areas[area.ID].Dreaming);
        }