Beispiel #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();
    }
Beispiel #2
0
 private void Awake()
 {
     _menuActiveState = this;
 }