public override void BeginNewGame(ISFSObject sfsObject) { base.BeginNewGame(sfsObject); if (GameData.IsCreatRoom) { GameData.CreateRoomInfo.AddRound(); EventObj.SendEvent("TableViewEvent", "FreshCurRound", GameData.CreateRoomInfo); } for (int i = 0; i < GameData.UserInfoDict.Count; i++) { GameData.GetPlayer(i).ReadyState = false; } }
public void CreateAllCards(object data) { var cardData = (ISFSObject)data; var cards = cardData.GetIntArray("cards"); var cardsNum = cardData.GetUtfStringArray("cardsNum"); var selfSeat = cardData.GetInt("selfSeat"); var allCardsCount = 0; _gdata.GetPlayer <JlGameSelfPlayer>().RejoinFresh = new EventDelegate(OnTrusteeshipBtnClick); foreach (var t in cardsNum) { allCardsCount += int.Parse(t); } for (int i = 0; i < allCardsCount; i++) { JlGameCardItem mJlGameCard = (JlGameCardItem)Instantiate(JlGameCardItem, new Vector3(0.002f * i - 0.1f, 0, 0), Quaternion.identity); mJlGameCard.transform.SetParent(StartArea); mJlGameCard.SetCardDepth(i); mJlGameCard.transform.localScale = Vector3.one * 0.4f; mJlGameCard.GetComponent <UIEventListener>().onClick = OnClickCard; CardsList.Add(mJlGameCard); } StartCoroutine(AllocateCard(cards, cardsNum, selfSeat)); }