public Black_Dealer(CGame_BlackJack bjGame, Transform uiParent) : base(bjGame, uiParent) { if (m_BjGameBase != null) { string pointName = "Game_Model/Zhuozi/ZhuoMian/Points_New/Point_zhuang"; m_PokerPointArray = new Transform[5]; Transform parentTfm = GameObject.Find(pointName).transform; Transform tfm = parentTfm.Find("Poker/Poker_1"); for (int j = 0; j < 5; j++) { m_PokerPointArray[j] = tfm.GetChild(j); } m_CountPoint = tfm.Find("point_tips_bg"); m_ChipPoint = parentTfm.Find("Chip").GetChild(0); m_vecBlackPoker = new List <byte> [1]; m_vecBlackPoker[0] = new List <byte>(); m_InfoUIObj = uiParent.parent.Find("Top").Find("DelaerInfo").gameObject; m_InfoUIObj.SetActive(false); m_CountTip = new GameObject[1]; UnityEngine.Object obj = (GameObject)m_BjGameBase.m_AssetBundle.LoadAsset("Model_tipsBG_dealer"); m_CountTip[0] = GameMain.instantiate(obj) as GameObject; m_CountTip[0].SetActive(false); } }
public void Init(CGame_BlackJack bjGame, Transform uiParent) { m_BjGameBase = bjGame; m_iRoomID = 0; m_nRoomLevel = NoSit; m_eRoomState = BlackRoomState_Enum.BlackRoomState_Init; m_fCountTime = 0.0f; m_iTurnAskDoubleSign = NoSit; m_iCurPokerPos = 0; m_Dealer = new Black_Dealer(bjGame, uiParent); m_PlayerList = new Black_Player[PlayerNum]; for (byte i = 0; i < m_PlayerList.Length; i++) { m_PlayerList[i] = new Black_Player(i, bjGame, uiParent); } GameObject gameObj = GameObject.Find("Game_Model/DealerCtrl"); if (gameObj != null) { m_DealerAnimCtrl = gameObj.AddComponent <Black_DealerAnimCtrl>(); m_DealerAnimCtrl.m_BjGameBase = bjGame; } }
public RoomInfo(CGame_BlackJack bjGame, Transform uiParent) { Init(bjGame, uiParent); }
public Black_Player(byte index, CGame_BlackJack bjGame, Transform uiParent) : base(bjGame, uiParent) { m_nIndex = index; if (m_BjGameBase != null) { if (m_BjGameBase.m_SitUIObj != null) { m_SitUIObj = m_BjGameBase.m_SitUIObj.transform.GetChild(index).gameObject; } string pointName = "Game_Model/Zhuozi/ZhuoMian/Points_New/Point_xian_" + (m_nIndex + 1).ToString(); Transform parentTfm = GameObject.Find(pointName).transform; Transform tfm; m_PokerPointArray = new Transform[3][]; m_PokerPointArray[0] = new Transform[5]; m_PokerPointArray[1] = new Transform[5]; m_PokerPointArray[2] = new Transform[5]; m_CountPointArray = new Transform[3]; for (int i = 0; i < 3; i++) { tfm = parentTfm.Find("Poker").Find("Poker_" + (i + 1).ToString()); for (int j = 0; j < 5; j++) { m_PokerPointArray[i][j] = tfm.GetChild(j); } m_CountPointArray[i] = tfm.Find("point_tips_bg"); } m_ChipPointArray = new Transform[3, 3]; for (int i = 0; i < 3; i++) { tfm = parentTfm.Find("Chip").Find("Chip_" + (i + 1).ToString()); for (int j = 0; j < 3; j++) { m_ChipPointArray[i, j] = tfm.GetChild(j); } } m_vecBlackPoker = new List <byte> [2]; m_vecBlackPoker[0] = new List <byte>(); m_vecBlackPoker[1] = new List <byte>(); if (m_BjGameBase.m_AssetBundle != null) { UnityEngine.Object obj = (GameObject)m_BjGameBase.m_AssetBundle.LoadAsset("PlayerInfor"); m_InfoUIObj = (GameObject)GameMain.instantiate(obj); BillBoard billboard = m_InfoUIObj.AddComponent <BillBoard>(); billboard.GameBase = m_BjGameBase; billboard.Target = GameObject.Find("Game_Model/Zhuozi/Yizi/Icon_Point_" + (int)(m_nIndex + 1)); m_InfoUIObj.transform.SetParent(uiParent, false); m_InfoUIObj.transform.Find("Button_Invitation").GetComponent <Button>().onClick.AddListener(OnClickInvite); m_TimeImg = m_InfoUIObj.transform.Find("PlayerBG").Find("Head").Find("HeadOutline").Find("OutlineCountdown").GetComponent <Image>(); m_InfoUIObj.SetActive(false); m_CountTip = new GameObject[2]; obj = (GameObject)m_BjGameBase.m_AssetBundle.LoadAsset("Model_tipsBG"); m_CountTip[0] = GameMain.instantiate(obj) as GameObject; m_CountTip[0].SetActive(false); m_CountTip[1] = GameMain.instantiate(obj) as GameObject; m_CountTip[1].SetActive(false); } } }
public Black_Role(CGame_BlackJack bjGame, Transform uiParent) { m_BjGameBase = bjGame; Init(); }