Ejemplo n.º 1
0
    private HBD_TemplateAction NewActionItem()
    {
        HBD_TemplateAction newItem = Instantiate(templatePrefab.gameObject, stdContainer).GetComponent <HBD_TemplateAction>();

        templates.Add(newItem);
        newItem.onClick = onNewActionClick;
        return(newItem);
    }
Ejemplo n.º 2
0
    void OnNewActionClick(HBD_TemplateAction template)
    {
        //Instantiate une looseAction, et la remplir de l'information
        //print("Nouvelle action de type: " + template.actionClone.GetHeroActionInfo().GetDisplayName());

        HBD_LooseAction looseAction = Instantiate(looseActionPrefab.gameObject, transform.parent).GetComponent <HBD_LooseAction>();

        looseAction.Fill(this, hb, tempList, loopList, template);

        //looseAction.fi
        //if (putInTemp.isOn)
        //    hb.AddTemporaryAction(template.actionClone.Clone());
        //else
        //    hb.AddAction(template.actionClone.Clone());
    }
Ejemplo n.º 3
0
    public void Fill(HeroBehaviorDisplay display, HeroBehavior hb, HBD_ActionList tempList, HBD_ActionList loopList, HBD_TemplateAction templateAction)
    {
        existingAction = templateAction.actionClone;
        this.loopList  = loopList;
        this.tempList  = tempList;
        this.display   = display;
        this.hb        = hb;
        createNew      = true;

        SharedFill();
    }