Exemplo n.º 1
0
 private void OnClickRoom(HuntRoomItem item)
 {
     if (item != null && item.Info != null)
     {
         if (item.Info.playerNums < HuntManager.Instance.RoomMaxPlayer)
         {
             HuntEnterRoomUI huntEnterRoomUI = UIManagerControl.Instance.OpenUI("HuntEnterRoomUI", null, false, UIType.NonPush) as HuntEnterRoomUI;
             huntEnterRoomUI.SetData(item.Info.roomId);
         }
         else
         {
             UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(511623, false));
         }
     }
 }
Exemplo n.º 2
0
    private void OnClickQuick(GameObject go)
    {
        List <RoomUiInfo> curRoomInfos = HuntManager.Instance.CurRoomInfos;

        if (curRoomInfos != null)
        {
            for (int i = 0; i < curRoomInfos.get_Count(); i++)
            {
                if (curRoomInfos.get_Item(i).playerNums < HuntManager.Instance.RoomMaxPlayer)
                {
                    HuntEnterRoomUI huntEnterRoomUI = UIManagerControl.Instance.OpenUI("HuntEnterRoomUI", null, false, UIType.NonPush) as HuntEnterRoomUI;
                    huntEnterRoomUI.SetData(curRoomInfos.get_Item(i).roomId);
                    return;
                }
            }
        }
        UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(511621, false));
    }