public virtual void UseSlotObject()
 {
     if (slotType == SLOT_TYPE.ITEM_SLOT)
     {
         Debug.Log("item");
         SlotObjectItem obj = gameObject.GetComponent <SlotObjectItem>();
         obj.UseItem();
     }
     else if (slotType == SLOT_TYPE.SKILL_SLOT)
     {
         Debug.Log("skill");
         SlotObjectSkill obj = gameObject.GetComponent <SlotObjectSkill>();
         obj.UseSkill();
     }
 }
Beispiel #2
0
    public void SettingSkill(CharacterSkill _characterSkill, int _slotNum)
    {
        characterSkill = _characterSkill;

        Sprite newSprite = Resources.Load <Sprite>("Images/Skills/" + _characterSkill.ImageName);

        this.SkillImageBackground.sprite = newSprite;
        this.SkillImageForeground.sprite = newSprite;

        SetSkillLevel(_characterSkill.SkillLevel);

        slotNum = _slotNum;

        SlotObjectSkill slotObjectSkill = gameObject.GetComponentInChildren <SlotObjectSkill>();

        slotObjectSkill.characterSkill = _characterSkill;
    }