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);
        }
Esempio n. 3
0
 /// <summary>
 /// Удаляет перк у текущей сущности.
 /// </summary>
 public virtual void RemovePerk(Perk perk)
 {
     entity.currentPerks.Remove(perk);
 }
Esempio n. 4
0
 public void SetTrack(Perk currPerk)
 {
     currentPerk = currPerk;
 }
Esempio n. 5
0
 /// <summary>
 /// Добавляет перк текущей сущности.
 /// </summary>
 public virtual void AddPerk(Perk perk)
 {
     entity.currentPerks.Add(perk);
 }