Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
 public InventorySystem(PlayerSystem player)
 {
     Owner = player;
 }
Exemplo n.º 3
0
 public ItemDropSystem(PlayerSystem player) => Owner = player;
Exemplo n.º 4
0
 public ResourceSystem(PlayerSystem player)
 {
     Owner = player;
 }
Exemplo n.º 5
0
 public ElementSystem(PlayerSystem player) => owner = player;