Esempio n. 1
0
        public void LevelUp(CharacterEquipementController c, int oldLevel)
        {
            animatorLevelUp.gameObject.SetActive(true);
            textCharacterName.text = c.CharacterStatController.CharacterData.CharacterName;

            StartCoroutine(LevelUpCoroutine(c, oldLevel));
        }
Esempio n. 2
0
 public void DrawCharacter(CharacterStatController stat, CharacterEquipementController characterEquipement)
 {
     textPlayerName.text = stat.CharacterData.CharacterName;
     hpGauge.DrawGauge(stat.Hp, stat.GetHPMax());
     DrawWeapon(characterEquipement.GetWeapon());
     //hpGauge.DrawHealthGauge(stat.Hp, stat.HpMax, stat.Scratch);
 }
Esempio n. 3
0
 private void DrawWeaponLevel()
 {
     CharacterEquipementController c = partyData.CharacterEquipement[indexCharacterSelection];
     imageWeaponIcon.sprite = weaponDictionary.GetSpriteIcon(c.GetWeaponType());
     textWeaponName.text = c.GetWeapon().WeaponName;
     textWeaponLevel.text = partyData.CharacterStatControllers[indexCharacterSelection].Level.ToString();
     textWeaponNext.text = c.GetWeaponNextExp().ToString();
 }
Esempio n. 4
0
 public void GainExp(DamageMessage damageMessage)
 {
     CharacterEquipementController c = partyManager.GetCharacter().CharacterEquipement;
     int oldLevel = c.CharacterStatController.Level; // pas opti
     if (c.GainWeaponExp(damageMessage.exp) == true)
     {
         LevelUp(c, oldLevel);
     }
 }
Esempio n. 5
0
 private IEnumerator WaitLevelUpCoroutine(float time, CharacterEquipementController c, int oldLevel)
 {
     float t = 0f;
     while (t < time)
     {
         t += Time.unscaledDeltaTime;
         if (Input.GetButtonDown(control.buttonA))
         {
             yield return null;
             SkipLevel(c, oldLevel);
         }
         yield return null;
     }
     yield return null;
 }
Esempio n. 6
0
        public void SkipLevel(CharacterEquipementController c, int oldLevel)
        {
            StopAllCoroutines();
            animatorLevelUp.SetTrigger("Skip");
            textCharacterOldLevel.text = oldLevel.ToString();
            textCharacterNewLevel.text = c.CharacterStatController.Level.ToString();
            textCharacterOldHP.text = ((int)c.CharacterGrowthController.GetStatAtLevel(statHP, oldLevel)).ToString();
            textCharacterNewHP.text = ((int)c.CharacterStatController.GetStat(statHP)).ToString();

            AttackAimProperty a = c.GotNewSkill(c.CharacterStatController.Level);
            if (a != null)
            {
                panelNewSkill.SetActive(true);
                textSkillProperty.text = "Charge " + a.GetCharge(0) + "   :   " + a.GetLabel() + a.GetLabelValue(a.GetCharge(0));
            }
            StartCoroutine(EndLevelCoroutine());
        }
Esempio n. 7
0
 private IEnumerator LevelUpCoroutine(CharacterEquipementController c, int oldLevel)
 {
     AudioManager.Instance.PlaySound(levelUpClip);
     Time.timeScale = 0f;
     yield return new WaitForSecondsRealtime(1f);
     StartCoroutine(DrawTextCoroutine(oldLevel, textCharacterOldLevel));
     yield return WaitLevelUpCoroutine(1f, c, oldLevel);
     StartCoroutine(DrawTextCoroutine(c.CharacterStatController.Level, textCharacterNewLevel));
     yield return WaitLevelUpCoroutine(0.5f, c, oldLevel);
     StartCoroutine(DrawTextCoroutine((int)c.CharacterGrowthController.GetStatAtLevel(statHP, oldLevel), textCharacterOldHP));
     yield return WaitLevelUpCoroutine(1f, c, oldLevel);
     StartCoroutine(DrawTextCoroutine((int)c.CharacterStatController.GetStat(statHP), textCharacterNewHP));
     // Placeholder
     AttackAimProperty a = c.GotNewSkill(c.CharacterStatController.Level);
     if (a != null)
     {
         panelNewSkill.SetActive(true);
         textSkillProperty.text = "Charge " + a.GetCharge(0) + "   :   " + a.GetLabel() + a.GetLabelValue(a.GetCharge(0));
     }
     SkipLevel(c, oldLevel);
 }