Exemplo n.º 1
0
    private void Claim()
    {
        if (_claimed)
        {
            return;
        }

        var q    = GameObject.Find("LocalEventManager");
        var bman = q.GetComponent <LocalEventManager>();

        var _allManRef = new AllManagers()
        {
            GameManager = bman.GameManager,
            UIManager   = bman.UIManager
        };

        _reward.Apply(_allManRef);
        _claimed = true;
    }
Exemplo n.º 2
0
    public void Resolve(params Hero[] heroes)
    {
        switch (type)
        {
        case ResultType.Action:
            action?.Invoke();
            break;

        case ResultType.Penalty:
            foreach (var hero in heroes)
            {
                penalty.Apply(hero);
            }
            break;

        case ResultType.Reward:
            foreach (var hero in heroes)
            {
                reward.Apply(hero);
            }
            break;
        }
    }