IEnumerator MoveCardObjectToPlayer(GameObject src, GameObject dest)
    {
        movingCardObject.SetActive(true);
        movingCardObject.GetComponent <Image> ().sprite           = src.GetComponent <Image> ().sprite;
        movingCardObject.GetComponent <RectTransform> ().position = src.GetComponent <RectTransform> ().position;
//		handleAnim.GetInstanceCardAnimation ().MoveObject (movingCardObject, dest);
        animationManager.MoveObject(movingCardObject, dest);
        //	src.SetActive (false);
        yield return(new WaitForSeconds(0.2f));

        movingCardObject.SetActive(false);
    }
Esempio n. 2
0
    IEnumerator CollectAllBetCoinsTOCenterOfTable()
    {
        GameObject src  = null;
        GameObject dest = null;

        int i = 0;

        while (i < playersManager.getAllPlayers().Count)
        {
            PlayerBean player = playersManager.getAllPlayers() [i];
            if (!player.isFoldedPlayer())
            {
                src  = player.getBetChipsObject().gameObject;
                dest = gameManagerGameObject.transform.Find("TableChips/ChipsSet1").gameObject;
                movingCoinObject.GetComponent <Image> ().sprite           = src.GetComponent <Image> ().sprite;
                movingCoinObject.GetComponent <RectTransform> ().position = src.GetComponent <RectTransform> ().position;
                animationManager.MoveObject(movingCoinObject, dest);
                src.SetActive(false);
                yield return(new WaitForSeconds(1f));
            }
            yield return(new WaitForSeconds(0.0f));

            i++;
        }
    }