Exemplo n.º 1
0
 void OnWoodChopped(object sender, MainCharacterBehaviour.OnWoodChoppedEventArgs e)
 {
     if (currentPallier == xpPalliers.Count - 1)
     {
         return;
     }
     currentXp++;
     if (currentXp >= xpPalliers[currentPallier])
     {
         currentXp -= xpPalliers[currentPallier];
         currentPallier++;
         popupLevelUp.SetActive(true);
         popup.SetActive(false);
         pallierImage.overrideSprite = sprites[currentPallier];
         levelText.text = "Niveau : " + currentPallier;
         isLevelUp      = true;
         //Time.timeScale =  0 ;
         foreach (LevelUpUI lui in levels)
         {
             if (lui.indexPallier == currentPallier)
             {
                 lui.SetUnlockable();
             }
         }
         anim.Play();
     }
 }
Exemplo n.º 2
0
 public void OnWoodChopped(object sender, MainCharacterBehaviour.OnWoodChoppedEventArgs e)
 {
     if (e.wood > firstMissionWood)
     {
         isParentedToPlayer = true;
         Destroy(GameObject.FindGameObjectWithTag("ColliderTuto"));
         character.onWoodChopped -= OnWoodChopped;
     }
 }
Exemplo n.º 3
0
 private void OnWoodChopped(object sender, MainCharacterBehaviour.OnWoodChoppedEventArgs e)
 {
     woodCut++;
     achievementCheck(woodCutAchievements, woodCut);
 }