Пример #1
0
    public void RemoveResource(ResourceType type, int value)
    {
        switch (type)
        {
        case ResourceType.Gold:
            gold -= value;

            if (gold < 0f)
            {
                gold = 0;
            }
            break;
        }

        ResourceManagerUpdateEvent?.Invoke();
    }
Пример #2
0
    public void AddResource(ResourceType type, int value)
    {
        switch (type)
        {
        case ResourceType.Gold:
            gold += value;
            break;

        case ResourceType.Kills:
            kills += value;
            break;

        case ResourceType.RoomsCompleted:
            roomsCompleted += value;
            break;
        }

        ResourceManagerUpdateEvent?.Invoke();
    }
Пример #3
0
 private void Update()
 {
     ResourceManagerUpdateEvent?.Invoke();
 }