private HBD_TemplateAction NewActionItem() { HBD_TemplateAction newItem = Instantiate(templatePrefab.gameObject, stdContainer).GetComponent <HBD_TemplateAction>(); templates.Add(newItem); newItem.onClick = onNewActionClick; return(newItem); }
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()); }
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(); }