Exemplo n.º 1
0
 public override void Init(object[] data) {
   gameType = (BaseGameScreen.GameType)data[0];
   EventDelegate.Set(btnBack.onClick, BackToSelectGame);
   EventDelegate.Set(btnCreateRoom.onClick, OpenPopupCreateRoom);
   // fake room list
   // roomList = new JSONArray();
   roomList = ((JSONObject)data[1]).GetArray("rooms");
   Debug.Log(roomList.ToString());
   // fake room min bet
   // int[] roomBet = new int[] { 10000, 100000, 520000, 2000000};
   // for (int i = 0; i < roomList.Length; i++) {
   //   JSONObject room = roomList[i].Obj;
   //   room.Add("id", i);
   //   room.Add("name", "room " + i);
   //   room.Add("minBet", roomBet[i % 4]);
   //   // roomList.Add(room);
   // }
   InitScrollViewData();
   // Set Bet Filter
   for (int i = 0; i < betFilterList.Length; i++) {
     betFilterPopupList.items.Add(betFilterList[i]);
   }
   EventDelegate.Set(betFilterPopupList.onChange, EventFilterBet);
   crtBetFilter = betFilterList[0];
 }
Exemplo n.º 2
0
 public override void Init(object[] data)
 {
     base.Init(data);
     gameType = (BaseGameScreen.GameType)data[0];
     EventDelegate.Set(btnConfirm.onClick, EventLeaveGame);
     EventDelegate.Set(btnCancel.onClick, Close);
 }
 public override void Init(object[] data)
 {
     gameType = (BaseGameScreen.GameType)data[0];
     EventDelegate.Set(btnBack.onClick, BackToSelectGame);
     EventDelegate.Set(btnCreateRoom.onClick, OpenPopupCreateRoom);
     // fake room list
     // roomList = new JSONArray();
     roomList = ((JSONObject)data[1]).GetArray("rooms");
     Debug.Log(roomList.ToString());
     // fake room min bet
     // int[] roomBet = new int[] { 10000, 100000, 520000, 2000000};
     // for (int i = 0; i < roomList.Length; i++) {
     //   JSONObject room = roomList[i].Obj;
     //   room.Add("id", i);
     //   room.Add("name", "room " + i);
     //   room.Add("minBet", roomBet[i % 4]);
     //   // roomList.Add(room);
     // }
     InitScrollViewData();
     // Set Bet Filter
     for (int i = 0; i < betFilterList.Length; i++)
     {
         betFilterPopupList.items.Add(betFilterList[i]);
     }
     EventDelegate.Set(betFilterPopupList.onChange, EventFilterBet);
     crtBetFilter = betFilterList[0];
 }
Exemplo n.º 4
0
    private BaseScreen SetGameScreen(BaseGameScreen.GameType gameType, object[] data = null)
    {
        GameObject tempGameObject;
        BaseScreen tempScreen;

        switch (gameType)
        {
        default:
            tempScreen = null;
            break;
        }
        CurrentGameScreen = tempScreen as BaseGameScreen;
        return(tempScreen);
    }
Exemplo n.º 5
0
 public override void Init(object[] data) {
   base.Init(data);
   gameType = (BaseGameScreen.GameType)data[0];
   EventDelegate.Set(btnConfirm.onClick, EventLeaveGame);
   EventDelegate.Set(btnCancel.onClick, Close);
 }