Example #1
0
 void Start()
 {
     scope.Listen("PlayerSelectCardList", delegate(object[] args)
     {
         int fd = (int)(args[0]);
         int sd = (int)(args[1]);
         for (int i = 0; i < allCardObjects.Count; ++i)
         {
             PokerControl p = allCardObjects[i].GetComponent <PokerControl> ();
             bool selected  = p.ShowIndex >= fd && p.ShowIndex <= sd;
             p.SetSelectState(selected);
         }
     });
 }
Example #2
0
    public List <PlayerCard> PickSelectCards()
    {
        List <PlayerCard> list = new List <PlayerCard> ();

        for (int i = 0; i < allCardObjects.Count; ++i)
        {
            PokerControl p = allCardObjects[i].GetComponent <PokerControl> ();
            if (p.isSelected)
            {
                list.Add(p.GetCard());
            }
        }
        return(list);
    }
Example #3
0
    public List <PlayerCard> PickSelectCards()
    {
        List <PlayerCard> theCardlist  = new List <PlayerCard> ();
        List <PlayerCard> overCardlist = new List <PlayerCard> ();

        for (int i = 0; i < allCardObjects.Count; ++i)
        {
            PokerControl p = allCardObjects[i].GetComponent <PokerControl> ();
            if (p.isSelected)
            {
                theCardlist.Add(p.GetCard());
            }
            else
            {
                overCardlist.Add(p.GetCard());
            }
        }

        ShowCardList(overCardlist);
        return(theCardlist);
    }
Example #4
0
    public void ShowCardList(List <PlayerCard> playcards)
    {
        ClearOldCard();

        Vector3 pos = Vector3.zero;

        for (int i = 0; i < playcards.Count; ++i)
        {
            GameObject childCard = GameObject.Instantiate(cardTemplate);
            childCard.transform.parent        = gameObject.transform;
            childCard.transform.localPosition = pos;
            childCard.transform.localScale    = Vector3.one;

            allCardObjects.Add(childCard);

            PokerControl p = childCard.GetComponent <PokerControl> ();
            p.SetCard(playcards [i]);
            p.SetDepth(i);

            pos.x = pos.x + 25;
        }
    }
Example #5
0
 void Awake()
 {
     instance = this;
     SumChipControl.IsChipSum = true;
 }