private TextPerkBufCustomization CreateBuf(ScrollViewManipulatorCustomization parent, Perk perk) { if (parent.isNoDuplicate) { if (scrollViewTo.IsContains(perk.varName)) { return(null); } } TextPerkBufCustomization newPerk = Help.HelpFunctions.TransformSeer.CreateObjectInParent(parent.content, textPerkBufPrefab.gameObject, perk.varName).GetComponent <TextPerkBufCustomization>(); newPerk.perk = perk; newPerk.scrollView = parent; parent.AddObject(newPerk.gameObject); textPerksBuf.Add(newPerk); return(newPerk); }
private TextPerkCustomization CreatePerk(ScrollViewManipulatorCustomization parent, Perk perk) { if (parent.isNoDuplicate) { if (scrollViewTo.IsContains(perk.varName)) { return(null); } } TextPerkCustomization newPerk = Help.HelpFunctions.TransformSeer.CreateObjectInParent(parent.content, textPerkPrefab.gameObject, perk.varName).GetComponent <TextPerkCustomization>(); newPerk.perk = perk; newPerk.scrollView = parent; newPerk.isClickObject = parent.isClickObjects; newPerk.isDestoyObject = parent.isDestoyObjects; if (parent.isClickObjects) { newPerk.onClickPerk = SetPerkParent; } else { newPerk.onClickPerk = null; } parent.AddObject(newPerk.gameObject); return(newPerk); }
/// <summary> /// Удаляет перк у текущей сущности. /// </summary> public virtual void RemovePerk(Perk perk) { entity.currentPerks.Remove(perk); }
public void SetTrack(Perk currPerk) { currentPerk = currPerk; }
/// <summary> /// Добавляет перк текущей сущности. /// </summary> public virtual void AddPerk(Perk perk) { entity.currentPerks.Add(perk); }