You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.8 KiB

  1. -- 房间设置界面
  2. local PKWanFa = PKFramework.ImportWanFa("luaScript.SubGameDefine.PuKe.PKWanFa")
  3. local PKRoomRuleView = class("PKRoomRuleView", cc.UIView)
  4. function PKRoomRuleView:ctor()
  5. PKRoomRuleView.super.ctor(self);
  6. end
  7. function PKRoomRuleView:onEnter()
  8. PKRoomRuleView.super.onEnter(self)
  9. self.ui = loadUI("pk_base/res/ui/ui_fangjian/pk_ui_ruleView.ui")
  10. self:addChild(self.ui)
  11. local strGameInfo = app.room.roomInfo.strGameInfo
  12. local payText = PKWanFa.getClubTableWanFaInfo(strGameInfo,"deductRule")
  13. local baseScore = PKWanFa.getClubTableWanFaInfo(strGameInfo,"baseScore")
  14. local playerNum = PKWanFa.getClubTableWanFaInfo(strGameInfo,"playerNum")
  15. local jiaoPaiType = PKWanFa.getClubTableWanFaInfo(strGameInfo,"jiaoPaiType")
  16. local fanbao = PKWanFa.getClubTableWanFaInfo(strGameInfo,"fanBao")
  17. local firstBao = PKWanFa.getClubTableWanFaInfo(strGameInfo,"firstBao")
  18. local fightAlone = PKWanFa.getClubTableWanFaInfo(strGameInfo,"fightAlone")
  19. local unshuffle = PKWanFa.getClubTableWanFaInfo(strGameInfo,"unshuffle")
  20. local bombScore = PKWanFa.getClubTableWanFaInfo(strGameInfo,"bombScore")
  21. local withFlower = PKWanFa.getClubTableWanFaInfo(strGameInfo,"withFlower")
  22. local reNumShow = PKWanFa.getClubTableWanFaInfo(strGameInfo,"reNumShow")
  23. local jzdybq = PKWanFa.getClubTableWanFaInfo(strGameInfo,"jzdybq")
  24. local baseMulti = PKWanFa.getClubTableWanFaInfo(strGameInfo,"baseMulti")
  25. local forbidProp = PKWanFa.getClubTableWanFaInfo(strGameInfo,"forbidProp")
  26. local forbidVoice = PKWanFa.getClubTableWanFaInfo(strGameInfo,"forbidVoice")
  27. local otherStr = ""
  28. otherStr = playerNum ~= "" and otherStr..playerNum.." " or otherStr
  29. otherStr = jiaoPaiType ~= "" and otherStr..jiaoPaiType.." " or otherStr
  30. otherStr = fanbao ~= "" and otherStr..fanbao.." " or otherStr
  31. otherStr = firstBao ~= "" and otherStr..firstBao.." " or otherStr
  32. otherStr = fightAlone ~= "" and otherStr..fightAlone.." " or otherStr
  33. otherStr = unshuffle ~= "" and otherStr..unshuffle.." " or otherStr
  34. otherStr = bombScore ~= "" and otherStr..bombScore.." " or otherStr
  35. otherStr = withFlower ~= "" and otherStr..withFlower.." " or otherStr
  36. otherStr = reNumShow ~= "" and otherStr..reNumShow.." " or otherStr
  37. otherStr = jzdybq ~= "" and otherStr..jzdybq.." " or otherStr
  38. otherStr = baseMulti ~= "" and otherStr..baseMulti.." " or otherStr
  39. otherStr = forbidProp ~= "" and otherStr..forbidProp.." " or otherStr
  40. otherStr = forbidVoice ~= "" and otherStr..forbidVoice.." " or otherStr
  41. self.ui.Items.Text_JuShu:setText(tostring(app.room.roomInfo.nTotalGameNum))
  42. self.ui.Items.Text_BeiShu:setText(tostring(baseScore))
  43. self.ui.Items.Text_PayMode:setText(tostring(payText))
  44. self.ui.Items.Text_Rule:setText(tostring(otherStr))
  45. self.ui.Items.Button:registerClick(function ()
  46. self:removeFromParent();
  47. end)
  48. end
  49. return PKRoomRuleView;