|
-
- local designSize = cc.size(1280,720)
- local config = {}
-
- config.HANDCARD_VIEW = "mj.luaScript.Common.2d.CommonHandCard"
- config.MAHJONG_CARD = "mj.luaScript.Common.2d.CommonMahjongCard"
- config.OUTCARD_VIEW = "mj.luaScript.Common.2d.CommonOutCardView"
- config.HU_CARD_VIEW = "mj.luaScript.Common.2d.CommonHuCardView"
- config.GROUP_CHI = "mj.luaScript.Common.2d.CommonGroupChi"
- config.GROUP_PENG = "mj.luaScript.Common.2d.CommonGroupPeng"
- config.GROUP_GANG = "mj.luaScript.Common.2d.CommonGroupGang"
- config.GROUP_ANGANG = "mj.luaScript.Common.2d.CommonGroupAnGang"
- config.GROUP_BAGANG = "mj.luaScript.Common.2d.CommonGroupBaGang"
-
- -- 麻将牌类型
- config.MJType = {
- Stand = 1, -- 标准牌
- Out = 2, -- 出去的牌
- OutBlack = 3, -- 出去盖着的牌
- Operate = 4, -- 操作的牌 吃碰杠
- OperateBlack = 5, -- 操作的牌背面,伪3d需要
- Hu = 6, -- 胡牌正面,伪3d需要
- HuBlack = 7, -- 胡牌背面,伪3d需要
- Open = 8, -- 摊牌正面,伪3d需要
- OpenBlack = 9, -- 摊牌背面,伪3d需要
- }
-
- config.OutCardRowCount={
- -- 2人场
- [2] = {
- [1] = 10, [2] = 22, [3] = 10, [4] = 22,
- },
- -- 3人场
- [3] = {
- [1] = 11, [2] = 11, [3] = 11, [4] = 11,
- },
- -- 4人场
- [4] = {
- [1] = 11, [2] = 11, [3] = 11, [4] = 11,
- },
- }
-
- --麻将标准手牌图片
- config.MJStandImage={
- [1]="mj_2d_handcard_right.png",
- [2]="mj_2d_handcard_top.png",
- [3]="mj_2d_handcard_left.png",
- [4]="mj_2d_handcard_mine.png",
- }
-
- --麻将出牌图片
- config.MJOutImage={
- [1]="mj_2d_outcard_right.png",
- [2]="mj_2d_outcard_mine.png",
- [3]="mj_2d_outcard_right.png",
- [4]="mj_2d_outcard_mine.png",
- }
-
- config.MJHuImage = {
- [1]="mj_2d_outcard_right.png",
- [2]="mj_2d_outcard_mine.png",
- [3]="mj_2d_outcard_right.png",
- [4]="mj_2d_outcard_mine.png",
- }
-
- config.MJHuScale = {
- [1] = 0.8, [2] = 0.8, [3] = 0.8, [4] = 0.8,
- }
-
- --麻将操作图片
- config.MJOperateGroupImage={
- [1]="mj_2d_outcard_right.png",
- [2]="mj_2d_outcard_mine.png",
- [3]="mj_2d_outcard_right.png",
- [4]="mj_2d_opcard_mine.png",
- }
-
- --麻将背牌图片
- config.MJOutBlackImage={
- [1]="mj_2d_cardback_right.png",
- [2]="mj_2d_cardback_top.png",
- [3]="mj_2d_cardback_right.png",
- [4]="mj_2d_cardback_top.png",
- }
-
- --麻将组合背牌图片
- config.MJOperateBlackImage={
- [1]="mj_2d_cardback_right.png",
- [2]="mj_2d_cardback_top.png",
- [3]="mj_2d_cardback_right.png",
- [4]="mj_2d_cardback_mine.png",
- }
-
- -- 手牌起始位置
- config.HandCardStartPos = {
- [1] = {x = (designSize.width - 160)*g_radio_x, y = (170-10)*g_radio_y},
- [2] = {x = (designSize.width / 2 + 290)*g_radio_x, y = (designSize.height - 45)*g_radio_y},
- [3] = {x = 160*g_radio_x, y = (designSize.height - 90)*g_radio_y},
- [4] = {x = 70+(designSize.width*g_radio_x-designSize.width)/2, y = 60},
- }
-
- config.HandCardStartPosOfCardNum = {
- [7] = {
- [1] = {x = (designSize.width - 160) * g_radio_x, y = 250 * g_radio_y},
- [2] = {x = (designSize.width / 2 + 290) * g_radio_x - 150, y = (designSize.height - 45)*g_radio_y},
- [3] = {x = 160 * g_radio_x, y = (designSize.height - 150)*g_radio_y},
- [4] = {x = 350+(designSize.width*g_radio_x-designSize.width)/2, y = 60},
- },
- [10] = {
- [1] = {x = (designSize.width - 160)*g_radio_x, y = (170-10)*g_radio_y},
- [2] = {x = (designSize.width / 2 + 290)*g_radio_x - 130, y = (designSize.height - 45)*g_radio_y},
- [3] = {x = 160*g_radio_x, y = (designSize.height - 90)*g_radio_y},
- [4] = {x = 200+(designSize.width*g_radio_x-designSize.width)/2, y = 60},
- },
- [13] = {
- [1] = {x = (designSize.width - 160)*g_radio_x, y = (170-10)*g_radio_y},
- [2] = {x = (designSize.width / 2 + 290)*g_radio_x, y = (designSize.height - 45)*g_radio_y},
- [3] = {x = 160*g_radio_x, y = (designSize.height - 90)*g_radio_y},
- [4] = {x = 70+(designSize.width*g_radio_x-designSize.width)/2, y = 60},
- },
- }
- -- 手牌每个麻将子偏移量
- -- HandCardOffset[viewId].x
- config.HandCardOffsetPos = {
- [1] = {x = 0, y = -32},
- [2] = {x = -2, y = 0},
- [3] = {x = 0, y = -32},
- [4] = {x = -1, y = 0},
- }
-
- -- 组合牌坐标调整
- -- GroupOffsetConfig[viewId].x
- config.GroupOffsetConfig = {
- [1] = {x = 0, y = 116+2},
- [2] = {x = 140, y = 0},
- [3] = {x = 0, y = 116+2},
- [4] = {x = 200, y = 0},
- }
-
- -- 组合牌每张牌偏移量
- -- GroupCardOffsetConfig[viewId][cardIndex].x
- config.GroupCardOffsetConfig = {
- [1] = {
- [1] = {x = 0, y = -14},
- [2] = {x = 0, y = -14},
- [3] = {x = 0, y = -14},
- [4] = {x = 0, y = -35},
- },
- [2] = {
- [1] = {x = -2, y = 0},
- [2] = {x = -2, y = 0},
- [3] = {x = -2, y = 0},
- [4] = {x = -31, y = 15},
- },
- [3] = {
- [1] = {x = 0, y = -14},
- [2] = {x = 0, y = -14},
- [3] = {x = 0, y = -14},
- [4] = {x = 0, y = -43},
- },
- [4] = {
- [1] = {x = 0, y = -22},
- [2] = {x = -3, y = -22},
- [3] = {x = -3, y = -22},
- [4] = {x = -43.8, y = -2},
- },
- }
- -- 出牌区起始位置,每个玩家视角左上角第一颗麻将子的位置
- config.OutCardStartPos = {
- [1] = {x = (designSize.width / 2 + 273)*g_radio_x, y = (designSize.height / 2 - 145)*g_radio_y},
- [2] = {x = (designSize.width / 2 + 220)*g_radio_x, y = (designSize.height / 2 + 144 - 11)*g_radio_y},
- [3] = {x = (designSize.width / 2 - 272)*g_radio_x, y = (designSize.height / 2 + 225)*g_radio_y},
- [4] = {x = (designSize.width / 2 - 220)*g_radio_x, y = (designSize.height / 2 - 90 + 10)*g_radio_y},
- }
- config.OutCardStartPos2 = {
- [2] = {x = (designSize.width / 2 + 460)*g_radio_x, y = (designSize.height / 2 + 134)*g_radio_y},
- [4] = {x = (designSize.width / 2 - 464)*g_radio_x, y = (designSize.height / 2 - 58)*g_radio_y},
- }
- -- 出牌区每颗麻将子的位置
- -- 对应的x、y
- config.OutCardOffsetConfig = {
- [1] = {x = -2, y = -14},
- [2] = {x = -1, y = -12},
- [3] = {x = -2, y = -14},
- [4] = {x = -1, y = -12},
- }
- -- 出牌区每颗麻将子的位置
- -- 对应的x、y
- config.OutCardOffsetConfig2 = {
- [2] = {x = -1, y = -12},
- [4] = {x = -1, y = -12},
- }
-
- config.OpenCardOffsetConfig = {
- [1] = {x = 0, y = -14},
- [2] = {x = -2, y = 0},
- [3] = {x = 0, y = -14},
- [4] = {x = 0, y = 0},
- }
-
- config.HandCardFaceOffsetConfig = {
- [1] = {x = 0, y = 0, scale = 1.0, rotation = 90},
- [2] = {x = 0, y = 0, scale = 1.0, rotation = 0},
- [3] = {x = 0, y = 0, scale = 1.0, rotation = -90},
- [4] = {x = 0, y = -4, scale = 1.0, rotation = 0},
- }
-
- config.OpenCardFaceOffsetConfig = {
- [1] = {x = 0, y = 8, scale = 0.5, rotation = 90},
- [2] = {x = 0, y = 8, scale = 0.5, rotation = 0},
- [3] = {x = 0, y = 8, scale = 0.5, rotation = -90},
- [4] = {x = 0, y = 0, scale = 1.0, rotation = 0},
- }
-
-
-
- -- 出牌区起始位置,每个玩家视角左上角第一颗麻将子的位置
- config.HuXueliuCardStartPos = {
- --[[[1] = {x = (designSize.width / 2 + 273)*g_radio_x, y = (designSize.height / 2 - 145)*g_radio_y},
- [2] = {x = (designSize.width / 2 + 220)*g_radio_x, y = (designSize.height / 2 + 144)*g_radio_y},
- [3] = {x = (designSize.width / 2 - 272)*g_radio_x, y = (designSize.height / 2 + 225)*g_radio_y},
- [4] = {x = (designSize.width / 2 - 220)*g_radio_x, y = (designSize.height / 2 - 90)*g_radio_y},--]]
- [1] = {x = (designSize.width / 2 + 273 + 66 * 2)*g_radio_x, y = (designSize.height / 2 - 145)*g_radio_y},
- [2] = {x = (designSize.width / 2 + 220)*g_radio_x, y = (designSize.height / 2 + 144 + 66 * 2 - 20)*g_radio_y},
- [3] = {x = (designSize.width / 2 - 272 - 66 * 2)*g_radio_x, y = (designSize.height / 2 + 225)*g_radio_y},
- [4] = {x = (designSize.width / 2 - 220)*g_radio_x, y = (designSize.height / 2 - 90 - 66 * 2 + 14)*g_radio_y},
- }
- config.HuXueliuCardStartPos2 = {
- --[[[2] = {x = (designSize.width / 2 + 460)*g_radio_x, y = (designSize.height / 2 + 134)*g_radio_y},
- [4] = {x = (designSize.width / 2 - 464)*g_radio_x, y = (designSize.height / 2 - 58)*g_radio_y},--]]
-
- [2] = {x = (designSize.width / 2 + 220)*g_radio_x, y = (designSize.height / 2 + 134 + 66* 2 - 12)*g_radio_y},
- [4] = {x = (designSize.width / 2 - 220)*g_radio_x, y = (designSize.height / 2 - 58 - 66 * 2)*g_radio_y},
-
- }
-
-
- config.HuCardStartPos = {
- [1] = {x = (designSize.width / 2 + 420)*g_radio_x, y = (designSize.height / 2 + 250)*g_radio_y},
- [2] = {x = (designSize.width / 2 - 235)*g_radio_x, y = (designSize.height / 2 + 250)*g_radio_y},
- [3] = {x = (designSize.width / 2 - 420)*g_radio_x, y = (designSize.height / 2 - 170)*g_radio_y},
- [4] = {x = (designSize.width / 2 + 333)*g_radio_x, y = 150*g_radio_y},
- }
-
- config.HuCardOffsetPos = {
- [1] = {x = -13, y = -21},
- [2] = {x = -10, y = -23},
- [3] = {x = -13, y = -21},
- [4] = {x = -10, y = -23},
- }
-
- config.HuCardRowCount = {
- [1] = 15, [2] = 15, [3] = 15, [4] = 20,
- }
-
- -- 出牌区牌面偏移量配置
- config.OutCardFaceOffsetConfig = {
- [1] = {x = 0, y = 7, scale = 0.5, rotation = 90},
- [2] = {x = 0, y = 6, scale = 0.5, rotation = 0},
- [3] = {x = 0, y = 7, scale = 0.5, rotation = -90},
- [4] = {x = 0, y = 6, scale = 0.5, rotation = 0},
- }
-
- -- 胡牌区牌面偏移量配置
- config.HuCardFaceOffsetConfig = {
- [1] = {x = 0, y = 8, scale = 0.5, rotation = 90},
- [2] = {x = 0, y = 8, scale = 0.5, rotation = 0},
- [3] = {x = 0, y = 8, scale = 0.5, rotation = -90},
- [4] = {x = 0, y = 8, scale = 0.5, rotation = 0},
- }
-
- config.OpCardFaceOffsetConfig = {
- [1] = {x = 0, y = 7, scale = 0.5, rotation = 90},
- [2] = {x = 0, y = 6, scale = 0.5, rotation = 0},
- [3] = {x = 0, y = 7, scale = 0.5, rotation = -90},
- [4] = {x = 0, y = 10, scale = 0.7, rotation = 0},
- }
-
- return config
|