Esempio n. 1
0
 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");
 }
Esempio n. 2
0
 public void goToStage(StagePlace stage)
 {
     gameManager.SetCurrentStageIn(stage);
     StartMinigames();
 }
Esempio n. 3
0
 /// <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;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 /// <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;
 }
Esempio n. 6
0
 /// <summary>
 /// Sets the current stage in.
 /// </summary>
 /// <param name="stage">The current stage</param>
 public void SetCurrentStageIn(StagePlace stage)
 {
     MinigamesFinished = 0;
     currentStage = stage;
 }