Exemplo n.º 1
0
        private void OnProductionNotAvailable()
        {
            PlayerResources.OnResourceChanged += CheckIfNecessaryInputResourcesAreAvailable;
            //PlayerResources.OnMoneyChanged += (x) => CheckIfNecessaryInputResourcesAreAvailable();
            enabled = false;
            ToggleBuildingEffects(false);
            if (OnNotEnoughInputResourcesAvailable != null)
            {
                OnNotEnoughInputResourcesAvailable(this);
            }

            int missingID;

            PlayerResources.Instance.HasResourcesAmount(data.Resourceinput, data.Resourceinputamount, out missingID);
            EventLogManager.AddNewResourceUnavailableLog(this, missingID);
        }