public void toStage(StagePlace stage) { if (stage == StagePlace.Home) GetComponent<Animator>().SetTrigger ("ToHouse"); else if(IsSchoolUnlocked() && stage == StagePlace.School) GetComponent<Animator>().SetTrigger ("ToSchool"); else if (IsMountainsUnlocked() && stage == StagePlace.Outdoor) GetComponent<Animator>().SetTrigger ("ToMountain"); if(stage == StagePlace.School) Debug.Log ("School tapped but is unlocked"); else if (stage == StagePlace.Outdoor) Debug.Log ("Outdoor tapped but is unlocked"); }
public void goToStage(StagePlace stage) { gameManager.SetCurrentStageIn(stage); StartMinigames(); }
/// <summary> /// Returns true if the minigame is unlocked. /// </summary> /// <returns><c>true</c>, if currentScenePlace >= unlocked until, <c>false</c> otherwise.</returns> /// <param name="currentScenePlace">Current unlocked scene place.</param> public bool isUnlocked(StagePlace currentStagePlace) { return StageIn <= currentStagePlace; }
List<int> GetNumberOfMinigames(StagePlace stage) { List<int> result = new List<int>(); int counter = 0; foreach(MiniGame game in games){ if(game.StageIn == stage){ result.Add (counter); } counter++; } return result; }
/// <summary> /// Gets a list of minigames in the /// </summary> /// <returns>The list of minigames of the stage.</returns> /// <param name="stage">Stage</param> List<MiniGame> GetMinigamesOf(StagePlace stage) { List<MiniGame> result = new List<MiniGame>(); foreach(MiniGame game in games){ if(game.StageIn == stage){ result.Add (game); } } return result; }
/// <summary> /// Sets the current stage in. /// </summary> /// <param name="stage">The current stage</param> public void SetCurrentStageIn(StagePlace stage) { MinigamesFinished = 0; currentStage = stage; }