예제 #1
0
    public void Created()
    {
        if (created)
        {
            return;
        }

        if (GetComponentInChildren <AbilityBase>() != null)
        {
            AbilityBase ability = GetComponentInChildren <AbilityBase>();

            abilityName   = ability.GetAbilityName();
            abilityText   = ability.GetInfo();
            abilitySprite = ability.GetInventoryImageSprite();

            if (ability.GetComponent <Animator>() != null)
            {
                ability.GetComponent <Animator>().enabled = false;
            }

            //ability.GetBattleImageHolder().GetComponent<Image>().sprite = yellowBox;

            //ability.GetBattleImageHolder().GetComponent<Image>().enabled = false;
            //ability.GetInventoryImageHolder().GetComponent<Image>().enabled = true;

            created = true;
        }
    }
예제 #2
0
 private void PlayerStatusCheck()
 {
     {
         if (playerAbilities.GetComponent <PlayerMovement>().curState != PlayerMovement.PlayerState.Death || Mathf.Round(playerAbilities.GetComponent <PlayerMovement>().curplayerHp) <= 0)
         {
             playerHp.text = "Current Hp: " + Mathf.Round(playerAbilities.GetComponent <PlayerMovement>().curplayerHp);
         }
         else
         {
             playerHp.text = "Current Hp: 0";
         }
     }
 }