Exemplo n.º 1
0
    public void TrySelect()
    {
        if (_lastSelectedItem != null)
        {
            _lastSelectedItem.IsSelected = false;
        }

        if (IsPurchased == false)
        {
            MenuActiveState.GetInstance().ShowMenu("BuySkin");
            OnTryBuy?.Invoke(this);

            return;
        }

        IsSelected = true;

        BallTexture.GetInstance().SetSkin(BallSkin);
        PlayerPresenter.SelectedBallSkin = BallSkin.SkinInfo;

        _lastSelectedItem = this;

        OnSelected?.Invoke();
    }
Exemplo n.º 2
0
 public static void TryBuy() => OnTryBuy?.Invoke();