public void OnPointerExit(PointerEventData eventData)
    {
        if (eventData.pointerDrag != null && eventData.pointerDrag.GetComponent <CardGame>().CardPlayable)
        {
            _wonderManager = GameObject.FindGameObjectWithTag("WonderManager").GetComponent <WonderManager>();

            if (_playerManager.Player.PlayerNumber == ZoneJoueur || ZoneJoueur == 2)
            {
                _itemBeingDragged = eventData.pointerDrag.GetComponent <CardGame>();
                _itemBeingDragged.transform.localScale = _vector3Original;
                if (gameObject.GetComponent <Outline>() != null)
                {
                    gameObject.GetComponent <Outline>().effectDistance = new Vector2(0, 0);
                }
            }
        }
    }
Esempio n. 2
0
    private void Start()
    {
        _wonderManager   = GameObject.FindGameObjectWithTag("WonderManager").GetComponent <WonderManager>();
        _dragDropManager = GameObject.FindGameObjectWithTag("DragDropManager").GetComponent <DragDropManager>();


        if (CoutPiece != null)
        {
            CoutPiece.SetActive(false);
            CoutPieceText.SetActive(false);
        }

        if (_cardState == 0)
        {
            gameObject.SetActive(false);
        }
        else
        {
            gameObject.SetActive(true);
        }
    }
Esempio n. 3
0
 private void Start()
 {
     _wonderManager = GameObject.FindGameObjectWithTag("WonderManager").GetComponent <WonderManager>();
     initializeMerveilles();
 }