Пример #1
0
    public void OnPointerClick(PointerEventData eventData)
    {
        Selected = true;
        _animaManager.SetStateAnimation(gameObject, "select_num", IdCard);
        var type = CardGame.GetDataCard().TypeSubCard;

        if (type == SubTypeCard.LightEnemy)
        {
            _publisher.Publish(this, new CustomEventArgs(GameEventName.GoOpenPopupNoDescription, CardGame));
            _publisher.Publish(this, new CustomEventArgs(GameEventName.GoClosePopupDescriptionCard, CardGame));
            return;
        }
        if (type != SubTypeCard.GameArea && type != SubTypeCard.GameEvent)
        {
            _publisher.Publish(this, new CustomEventArgs(GameEventName.GoAddCardInInventory, CardGame.GetDataCard().NameCard));
            _publisher.Publish(this, new CustomEventArgs(GameEventName.GoOpenPopupWithDescriptionCard, CardGame));
        }
        else
        {
            _publisher.Publish(this, new CustomEventArgs(GameEventName.GoOpenPopupNoDescription, CardGame));
        }
    }