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); } }); }
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); }
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); }
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; } }
void Awake() { instance = this; SumChipControl.IsChipSum = true; }