Пример #1
0
        public void SetSystem(PlayerSystem player)
        {
            Owner = player;

            Owner.SpiritUISystem.Selling   += OnSelling;
            Owner.SpiritUISystem.Upgrading += OnUpgrading;
            UIManager.Instance.BuildUISystem.PlaceNewSpiritClicked += OnPlacingNewSpirit;

            selection = Instantiate(Selection);
            selection.SetActive(false);

            void OnPlacingNewSpirit(SpiritData spiritData)
            {
                var placedSpirit = Owner.AvailableSpirits.Find(spirit => spirit.Index == spiritData.Index);

                Owner.AvailableSpirits.Remove(placedSpirit);

                PlacingSpirit?.Invoke();
            }
        }
Пример #2
0
 public InventorySystem(PlayerSystem player)
 {
     Owner = player;
 }
Пример #3
0
 public ItemDropSystem(PlayerSystem player) => Owner = player;
Пример #4
0
 public ResourceSystem(PlayerSystem player)
 {
     Owner = player;
 }
Пример #5
0
 public ElementSystem(PlayerSystem player) => owner = player;