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(); } }
public void OnWoodChopped(object sender, MainCharacterBehaviour.OnWoodChoppedEventArgs e) { if (e.wood > firstMissionWood) { isParentedToPlayer = true; Destroy(GameObject.FindGameObjectWithTag("ColliderTuto")); character.onWoodChopped -= OnWoodChopped; } }
private void OnWoodChopped(object sender, MainCharacterBehaviour.OnWoodChoppedEventArgs e) { woodCut++; achievementCheck(woodCutAchievements, woodCut); }