public override void Build(Owner_ owner) { base.Build(owner); CreateSlots(); genericSlot = slots.Find(t => t.slotType == SlotType.Baggage); SetWeightCapacity(); currentWeight = GetCurrentWeight(); }
public Slot_ CreateSlot(SlotType slotType, Owner_ owner) { this.owner = owner; SetPlayerUI(); this.slotType = slotType; SetSlotNameAndUI(); storedItems = new List <Item_>(); return(this); }
public virtual void Empty() { owner = null; List <FieldInfo> fields = GetType().GetFields().ToList().FindAll(t => t.FieldType.InheritsFrom(typeof(Component_))); foreach (FieldInfo field in fields) { field.SetValue(this, null); } }
public virtual void Build(Owner_ owner) { this.owner = owner; List <FieldInfo> fields = GetType().GetFields().ToList().FindAll(t => t.FieldType.InheritsFrom(typeof(Component_))); foreach (FieldInfo field in fields) { Component_ component = (Component_)GetComponentInChildren(field.FieldType); if (component != null) { component.Build(owner); field.SetValue(this, component); } } }
public override void Build(Owner_ owner) { base.Build(owner); biome = new Biome(((Tree_)owner).biomeType); }
public override void Build(Owner_ owner) { base.Build(owner); bottomUi = FindObjectOfType <BottomUi>(); player = FindObjectOfType <Player_>(); }
public override void Build(Owner_ owner) { base.Build(owner); GenerateAnimations(); SetRandomSprite(); }