跑的快两人旧界面调整和新玩法界面
parent
e08a22afdc
commit
47d522443c
|
|
@ -18,11 +18,11 @@ function M:FillData(view, index)
|
|||
self._maxPlayer = 2 -- 默认玩家人数
|
||||
self._roundChoice = 5 -- 回合选项数
|
||||
|
||||
if oldGameVersion == 1 then
|
||||
self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast")
|
||||
else
|
||||
self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang")
|
||||
end
|
||||
-- if oldGameVersion == 1 then
|
||||
self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Label_Detail_Play")
|
||||
-- else
|
||||
-- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang")
|
||||
-- end
|
||||
|
||||
|
||||
if oldGameVersion == 2 then
|
||||
|
|
|
|||
|
|
@ -0,0 +1,290 @@
|
|||
---
|
||||
--- Created by 谌建军.
|
||||
--- DateTime: 2017/12/18 15:19
|
||||
---
|
||||
local EXGameInfo = {}
|
||||
|
||||
local M = EXGameInfo
|
||||
|
||||
function EXGameInfo.new(blur_view)
|
||||
setmetatable(M, { __index = IGameInfo })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = "EXGameInfo"
|
||||
UIPackage.AddPackage("extend/poker/runfast/ui/Info_Poker_RunFastNew")
|
||||
return self
|
||||
end
|
||||
|
||||
function M:FillData(view, index)
|
||||
self._maxPlayer = 2 -- 默认玩家人数
|
||||
self._roundChoice = 5 -- 回合选项数
|
||||
|
||||
-- if oldGameVersion == 1 then
|
||||
self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Label_Detail_Play")
|
||||
-- else
|
||||
-- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang")
|
||||
-- end
|
||||
|
||||
|
||||
-- self._config:GetChild("people_2").onClick:Set(function()
|
||||
-- self._config:GetController("rule").selectedIndex = 0
|
||||
-- end)
|
||||
|
||||
-- local piao = self._config:GetController("piao")
|
||||
-- local daniao = self._config:GetController("daniao")
|
||||
|
||||
-- piao.onChanged:Add(function()
|
||||
-- if piao.selectedIndex ~= 0 then
|
||||
-- daniao.selectedIndex = 0
|
||||
-- end
|
||||
-- end)
|
||||
|
||||
-- daniao.onChanged:Add(function()
|
||||
-- if daniao.selectedIndex ~= 0 then
|
||||
-- piao.selectedIndex = 0
|
||||
-- end
|
||||
-- end)
|
||||
end
|
||||
|
||||
local _help_url = "ui://Info_Poker_RunFastNew/Com_help"
|
||||
function M:GetHelpUrl()
|
||||
return _help_url
|
||||
end
|
||||
|
||||
local _icon_url = "ui://Info_Poker_RunFastNew/icon"
|
||||
function M:GetIconUrl()
|
||||
return _icon_url
|
||||
end
|
||||
|
||||
local _icon_url1 = "ui://Info_Poker_RunFastNew/icon1"
|
||||
function M:GetIconUrl1()
|
||||
return _icon_url1
|
||||
end
|
||||
|
||||
local _play_list = { "15张玩法", "16张玩法" }
|
||||
function M:GetPlayList()
|
||||
return _play_list
|
||||
end
|
||||
|
||||
function M:LoadConfigData(data)
|
||||
local _config = self._config
|
||||
_config:GetController("round").selectedIndex = data.opt - 1
|
||||
_config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1
|
||||
_config:GetController("play_list").selectedIndex = data.leaf - 1
|
||||
_config:GetController("willBeOut").selectedIndex = data.willBeOut - 1
|
||||
_config:GetController("heart10").selectedIndex = data.heartten - 1
|
||||
_config:GetController("bombSpring").selectedIndex = data.minboom - 1
|
||||
_config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1
|
||||
_config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1
|
||||
_config:GetController("showlength").selectedIndex = data.showlength
|
||||
_config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree
|
||||
_config:GetController("demolition").selectedIndex = data.demolition
|
||||
_config:GetController("fangzuobi").selectedIndex = data.fangzuobi
|
||||
|
||||
local sandaidan = data.sandaidan
|
||||
if sandaidan ~= nil and sandaidan == 1 then
|
||||
_config:GetChild("sandaidan").selected = true
|
||||
|
||||
_config:GetChild("planelack").selected = false
|
||||
_config:GetChild("Threelack").selected = false
|
||||
else
|
||||
_config:GetChild("sandaidan").selected = false
|
||||
|
||||
_config:GetChild("planelack").selected = data.planelack == 1 and true or false
|
||||
_config:GetChild("Threelack").selected = data.threelack == 1 and true or false
|
||||
end
|
||||
|
||||
local fs = data.fs
|
||||
if fs ~= nil and fs == 1 then
|
||||
_config:GetChild("fan_sprint").selected = true
|
||||
else
|
||||
_config:GetChild("fan_sprint").selected = false
|
||||
end
|
||||
|
||||
local ba = data.ba
|
||||
if ba ~= nil and ba == 1 then
|
||||
_config:GetChild("boom_add").selected = true
|
||||
else
|
||||
_config:GetChild("boom_add").selected = false
|
||||
end
|
||||
|
||||
_config:GetChild("ThreeA").selected = data.threeA == 1 and true or false
|
||||
|
||||
if data.piao ~= nil then
|
||||
_config:GetController("piao").selectedIndex = data.piao
|
||||
end
|
||||
|
||||
if data.daniao ~= nil then
|
||||
_config:GetController("daniao").selectedIndex = data.daniao
|
||||
end
|
||||
|
||||
if _config:GetChild("fourBeltThree") then
|
||||
_config:GetChild("fourBeltThree").selected = data.fourDaiTwo
|
||||
end
|
||||
|
||||
if _config:GetChild("fourBeltTwo") then
|
||||
_config:GetChild("fourBeltTwo").selected = data.fourDaiThree
|
||||
end
|
||||
|
||||
if _config:GetChild("xipai") then
|
||||
_config:GetChild("xipai").selected = data.xi_pai
|
||||
end
|
||||
|
||||
|
||||
if oldGameVersion == 2 then
|
||||
self.xipaiValueText.text = data.xi_pai_score / 1000
|
||||
self.xipaiValue = data.xi_pai_score / 1000
|
||||
|
||||
self.anchouValueText.text = data.an_chou_score / 1000
|
||||
self.anchouValue = data.an_chou_score / 1000
|
||||
end
|
||||
end
|
||||
|
||||
function M:SelectedConfigData()
|
||||
local _config = self._config
|
||||
local round = _config:GetController("round").selectedIndex
|
||||
local handcard = _config:GetController("handcard").selectedIndex
|
||||
local peopleNum = _config:GetController("peopleNum").selectedIndex
|
||||
local showCardNum = _config:GetController("showCardNum").selectedIndex
|
||||
local wanfa1_1 = _config:GetController("wanfa1_1").selectedIndex
|
||||
local wanfa1_2 = _config:GetController("wanfa1_2").selectedIndex
|
||||
local wanfa1_3 = _config:GetController("wanfa1_3").selectedIndex
|
||||
local wanfa1_4 = _config:GetController("wanfa1_4").selectedIndex
|
||||
local wanfa1_5 = _config:GetController("wanfa1_5").selectedIndex
|
||||
local wanfa2_1 = _config:GetController("wanfa2_1").selectedIndex
|
||||
|
||||
-- local rule = _config:GetController("rule").selectedIndex
|
||||
-- local leaf = _config:GetController("play_list").selectedIndex
|
||||
-- local willBeOut = _config:GetController("willBeOut").selectedIndex
|
||||
-- local bombSpring = _config:GetController("bombSpring").selectedIndex
|
||||
-- local heart10 = _config:GetController("heart10").selectedIndex
|
||||
-- local player_num = _config:GetController("player_num").selectedIndex
|
||||
-- local AA = _config:GetController("Cost").selectedIndex
|
||||
-- local showlength = _config:GetController("showlength").selectedIndex
|
||||
-- local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex
|
||||
-- local demolition = _config:GetController("demolition").selectedIndex
|
||||
-- local fangzuobi = _config:GetController("fangzuobi").selectedIndex
|
||||
-- local planelack = _config:GetChild("planelack").selected and 1 or 0
|
||||
-- local threelack = _config:GetChild("Threelack").selected and 1 or 0
|
||||
-- local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0
|
||||
-- local piao = _config:GetController("piao").selectedIndex
|
||||
-- local daniao = _config:GetController("daniao").selectedIndex
|
||||
-- local sandaidan = _config:GetController("sandaidan").selectedIndex
|
||||
-- local ba = _config:GetChild("boom_add").selected and 1 or 0
|
||||
-- local fs = _config:GetChild("fan_sprint").selected and 1 or 0
|
||||
|
||||
-----
|
||||
local fourDaiTwo = false
|
||||
if _config:GetChild("fourBeltThree") then
|
||||
fourDaiTwo = _config:GetChild("fourBeltThree").selected
|
||||
end
|
||||
|
||||
local fourDaiThree = false
|
||||
if _config:GetChild("fourBeltTwo") then
|
||||
fourDaiThree = _config:GetChild("fourBeltTwo").selected
|
||||
end
|
||||
|
||||
local xi_pai = false
|
||||
if _config:GetChild("xipai") then
|
||||
xi_pai = _config:GetChild("xipai").selected
|
||||
end
|
||||
|
||||
----
|
||||
local _data = {}
|
||||
_data["account_id"] = DataManager.SelfUser.Id
|
||||
-- _data["AA"] = AA
|
||||
-- _data["willBeOut"] = willBeOut + 1
|
||||
-- _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2
|
||||
-- _data["fourBeltThree"] = fourBeltThree
|
||||
-- _data["demolition"] = demolition
|
||||
-- _data["fangzuobi"] = fangzuobi
|
||||
-- _data["threeA"] = ThreeA
|
||||
-- _data["piao"] = piao
|
||||
-- _data["daniao"] = daniao
|
||||
-- _data["sandaidan"] = sandaidan
|
||||
-- _data["ba"] = ba
|
||||
-- _data["fs"] = fs
|
||||
|
||||
_data["fourDaiTwo"] = fourDaiTwo
|
||||
|
||||
-----------------------lingmeng----------------------------
|
||||
|
||||
_data["AA"] = 0
|
||||
_data["willBeOut"] = 1
|
||||
_data["minboom"] = 2
|
||||
_data["fourBeltThree"] = 0
|
||||
_data["demolition"] = 0
|
||||
_data["fangzuobi"] = 0
|
||||
_data["threeA"] = 0
|
||||
_data["piao"] = 0
|
||||
_data["daniao"] = 0
|
||||
_data["sandaidan"] = 0
|
||||
_data["ba"] = 0
|
||||
_data["fs"] = 0
|
||||
|
||||
|
||||
_data["leaf"] = handcard + 1
|
||||
_data["opt"] = round + 1
|
||||
_data["maxPlayers"] = peopleNum == 1 and 2 or 3
|
||||
_data["rule"] = wanfa1_5 == 0 and 2 or 1
|
||||
_data["showlength"] = showCardNum
|
||||
_data["planelack"] = wanfa1_2
|
||||
_data["threelack"] = wanfa1_2
|
||||
_data["fourDaiThree"] = false
|
||||
if wanfa1_3 then
|
||||
_data["fourDaiThree"] = true
|
||||
end
|
||||
_data["heartten"] = wanfa1_4 + 1
|
||||
_data["specilAdd"] = wanfa2_1
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
|
||||
-- if willBeOut == 1 then
|
||||
-- -- body
|
||||
-- _data["planelack"] = 0
|
||||
-- _data["threelack"] = 0
|
||||
-- else
|
||||
-- if sandaidan == 1 then
|
||||
-- _data["planelack"] = 0
|
||||
-- _data["threelack"] = 0
|
||||
-- else
|
||||
-- _data["planelack"] = planelack
|
||||
-- _data["threelack"] = threelack
|
||||
-- end
|
||||
-- end
|
||||
|
||||
_data['xi_pai'] = xi_pai
|
||||
|
||||
local xi_pai_score = 1
|
||||
local an_chou_score = 1
|
||||
|
||||
-- if oldGameVersion == 2 then
|
||||
-- xi_pai_score = self.xipaiValue
|
||||
-- an_chou_score = self.anchouValue
|
||||
-- end
|
||||
|
||||
_data['xi_pai_score'] = xi_pai_score * 1000
|
||||
_data['an_chou_score'] = an_chou_score * 1000
|
||||
|
||||
return _data
|
||||
end
|
||||
|
||||
function M:OnChangeOption(ctype, pay_obj)
|
||||
IGameInfo.OnChangeOption(self, ctype, pay_obj)
|
||||
local peopleNum = self._config:GetController("peopleNum")
|
||||
peopleNum.onChanged:Set(function()
|
||||
self._maxPlayer = peopleNum.selectedIndex == 1 and 2 or 3
|
||||
self:ShowVariablePrice(ctype, pay_obj)
|
||||
end)
|
||||
end
|
||||
|
||||
function M:LoadConfigToDetail(data)
|
||||
local configData = json.decode(data)
|
||||
local returnString = string.format("人数%s人", configData.maxPlayers)
|
||||
return returnString
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
---
|
||||
|
||||
local EXTEND_MODEL_NAME = ...
|
||||
local EXGameInfo = import(".EXGameInfo")
|
||||
local EXGameInfo = import(".EXGameInfo_jiangxi")
|
||||
local RunFast_MainView = import(".RunFast_MainView")
|
||||
local RunFast_GameController = import(".RunFast_GameController")
|
||||
local RunFast_RoomConfig = import(".RunFast_RoomConfig")
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ function M:GetOffSet(cardLength) -- 15 -70
|
|||
if cardLength > 8 then
|
||||
return 52 --40
|
||||
else
|
||||
return -cardLength * 5 + 80
|
||||
return -cardLength * -10 + 60
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -90,11 +90,11 @@ function M:InitPoker(pokerList, isPlayAni, open)
|
|||
local cs = 1.25
|
||||
-- print("==========================DataManager.CurrenRoom.cardsize", DataManager.CurrenRoom.cardsize)
|
||||
if DataManager.CurrenRoom.cardsize == 0 then
|
||||
cs = 2
|
||||
cs = 2.5
|
||||
elseif DataManager.CurrenRoom.cardsize == 1 then
|
||||
cs = 1.8
|
||||
cs = 2
|
||||
elseif DataManager.CurrenRoom.cardsize == 2 then
|
||||
cs = 1.5
|
||||
cs = 1.75
|
||||
end
|
||||
|
||||
if self.cor_init_poker ~= nil then
|
||||
|
|
@ -843,15 +843,16 @@ function M:GetHandCardOffset(count)
|
|||
else
|
||||
offset = -30
|
||||
end
|
||||
return -25
|
||||
return 20
|
||||
end
|
||||
|
||||
function M:GetHandCardPos(index, card_count)
|
||||
local x, y = 0, -18
|
||||
local x, y = 0, -20
|
||||
local offset = self:GetHandCardOffset(card_count)
|
||||
local middle_x = self.cards_view.width / 2
|
||||
local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2)
|
||||
x = start_x + (self.card_width + offset) * (index - 1)
|
||||
print("================================GetHandCardPos", x, y)
|
||||
return Vector2.New(x, y)
|
||||
end
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 165 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue