public virtual void Load(LevelCore level, RegionDifficulty difficulty) { if (Contains(level) == false) { throw new ArgumentException("Trying to load " + level.name + " But it's not a part of the " + name + " Region"); } World.Load(level, difficulty); }
protected virtual RegionDifficultyUITemplate CreateTemplate(RegionDifficulty difficulty) { var instance = Instantiate(template, panel); var script = instance.GetComponent <RegionDifficultyUITemplate>(); script.Init(); script.Set(difficulty); script.OnClick += OnElementClicked; return(script); }
public bool UnlockedOn(RegionDifficulty difficulty) { if (difficulty == null) { return(true); } if (difficulty > Region.Progress.Difficulty) { return(Region.Progress.At(difficulty.Previous) == Region.Size && Index == 0); } else { return(Region.Progress.At(difficulty) >= Index); } }
public virtual int At(RegionDifficulty target) { if (difficulty == null) { return(0); } if (target > difficulty) //haven't reached this difficulty yet { return(0); } else if (target < difficulty) //have surpassed this difficulty { return(Region.Size); } else //this is the current difficulty { return(count); } }
public virtual void Request(LevelCore level, RegionDifficulty difficulty, float time) { Request(level.Region.name, level.Index, difficulty.ID, time); }
public virtual void Set(RegionDifficulty difficulty) { this.Difficulty = difficulty; UpdateState(); }
public virtual void Load(LevelCore level, RegionDifficulty difficulty) { Current = new SelectionData(level, difficulty); Scenes.Load.All(level.Scene, Scenes.Level); }
public SelectionData(LevelCore level, RegionDifficulty difficulty) : this() { this.Level = level; this.Difficulty = difficulty; }
public virtual bool Contains(RegionDifficulty element) { return(list.Contains(element)); }
public virtual int IndexOf(RegionDifficulty element) { return(Array.IndexOf(list, element)); }
void DifficultySelectCallback(RegionDifficulty difficulty) { Selection.Difficulty = difficulty; LoadSelection(); }
public virtual void Load(RegionDifficulty difficulty) { Region.Load(this, difficulty); }