Exemplo n.º 1
0
    public void InitDescript(IHotbar skill)
    {
        string s = "";

        s  = skill.GetName();
        s += "\n" + skill.GetHotbarDescription();


        skillDescript.text = s;
    }
Exemplo n.º 2
0
    public void InitButton(ActorData data, IHotbar content, BoardManager ifsm, SkillDescriptPanel panel)
    {
        this.data          = data;
        this.content       = content;
        this.ifsm          = ifsm;
        this.skillDescript = panel;

        if (content != null)
        {
            icon.sprite = Globals.GetSprite(FilePath.IconSpriteAtlas, content.GetIconFilePath());

            if (content is IUseable)
            {
                useable = (IUseable)content;
            }
            else if (content is Item)
            {
                Item t = (Item)content;
                if (t.HasConsumableEFfect())
                {
                    useable = t.GetConsumableEffect();
                }
                else if (t.HasActivationEffect())
                {
                    useable = t.GetActivateableEffect();
                }
                else
                {
                    useable = null;
                }
            }
            else
            {
                useable = null;
            }
        }
        else
        {
            icon.sprite = Globals.GetSprite(FilePath.IconSpriteAtlas, "unkown");

            useable = null;
        }
    }
Exemplo n.º 3
0
    public void Initbuttons(ToolbarButton buttons, IHotbar skill, ActorData data)

    {
        buttons.InitButton(data, skill, boardManager, skillDescriptPanel);
    }
Exemplo n.º 4
0
 public void Initbuttons(int index, List <ToolbarButton> buttons, IHotbar skill, ActorData data)
 {
     buttons[index].InitButton(data, skill, boardManager, skillDescriptPanel);
 }