模板工程升级修改
This commit is contained in:
@@ -142,7 +142,7 @@ GameData.hallConfigName = ["enablePay",
|
||||
'wareHouse',//是否开启仓库功能0->不开启1->开启保险箱不开启赠送2->开启赠送不开启保险箱3->开启星星赠送(开启保险箱)4->开启房卡赠送(开启保险箱)5->开启星星房卡赠送(开启保险箱)
|
||||
'betaText',//版本号后的beta显示内容
|
||||
'launchImgUrl',//启动页图片地址
|
||||
'shareType:',//分享朋友圈类型0->链接分享 1->图片分享
|
||||
'shareType',//分享朋友圈类型0->链接分享 1->图片分享
|
||||
'shareImgUrl',//分享朋友圈图片链接
|
||||
'launchWaitTime',//启动等待时间
|
||||
'shareBgUrl',//分享背景图片
|
||||
|
||||
@@ -1377,7 +1377,7 @@ Func.accreditlogin=function(type){
|
||||
];
|
||||
var ram = ifast_random(100000);
|
||||
|
||||
sharelogin("fff23"+ram,headLoginList[ifast_random(headLoginList.length)],"测试"+ram,ifast_random(2)+1,"nanchang","jiangxi","ylgame"+ram);
|
||||
sharelogin("fff23"+ram,headLoginList[ifast_random(headLoginList.length)],ram + "测试",ifast_random(2)+1,"nanchang","jiangxi","ylgame"+ram);
|
||||
// sharelogin("fff23"+ram,headLoginList[ifast_random(headLoginList.length)],"测试"+ram,ifast_random(2)+1,"nanchang","jiangxi","oLVKis6bj3_l8qspMybG60KV2GN4");
|
||||
}
|
||||
|
||||
@@ -2432,7 +2432,7 @@ Func.getmarketname = function(){//
|
||||
return window.settings.getmarketname();
|
||||
}catch(e){
|
||||
if(GameData.userAgent != ConstVal.userAgent.uAgent_3){
|
||||
return 4;
|
||||
return 2;
|
||||
}else{
|
||||
return app_market;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ function Player(seat){
|
||||
//this.offline = 0;//玩家是否离线0->否 1->离线
|
||||
this.canexit=1;//是否可以直接离开
|
||||
this.onstate=0;//0:在线1:离线2:通话中
|
||||
/*
|
||||
{"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市",
|
||||
"cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333,
|
||||
"province":"江西省","street":"施尧路"}
|
||||
*/
|
||||
//定位信息 牌桌外
|
||||
this.addr = null;
|
||||
this.invitecode = "";//邀请码
|
||||
this.isStart = false;//能否点击按钮开始游戏
|
||||
@@ -31,6 +37,14 @@ function Player(seat){
|
||||
this.charm = undefined;
|
||||
this.sign = "";//签名
|
||||
this.tel = "";//绑定手机号
|
||||
/*
|
||||
{"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市",
|
||||
"cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333,
|
||||
"province":"江西省","street":"施尧路"}
|
||||
*/
|
||||
//定位信息 牌桌内
|
||||
this.location = null;
|
||||
|
||||
}
|
||||
//玩家信息初始化
|
||||
if(typeof(Player.prototype.Init) == "undefined"){
|
||||
@@ -67,6 +81,7 @@ if(typeof(Player.prototype.Init) == "undefined"){
|
||||
this.charm = undefined;
|
||||
this.sign = "";//签名
|
||||
this.tel = "";//绑定手机号
|
||||
|
||||
};
|
||||
}
|
||||
//玩家微信信息初始化
|
||||
@@ -107,6 +122,7 @@ if(typeof(Player.prototype.SetMyInfo) == "undefined"){
|
||||
this.charm = object.charm;
|
||||
this.sign = object.sign;
|
||||
this.tel = object.tel;
|
||||
|
||||
//this.setTel();
|
||||
//this.bankpwd = object.bank;//是否设置仓库密码 this.bankpwd = 0;//是否设置仓库密码
|
||||
//this.paycode = _paycode;
|
||||
@@ -121,7 +137,7 @@ if(typeof(Player.prototype.SetLocationInfo) == "undefined"){
|
||||
}else{
|
||||
set_self(200, 7, "获取定位失败!", 0, 0);
|
||||
}
|
||||
|
||||
this.location = _locationinfo;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -279,6 +295,7 @@ if(typeof(Player.prototype.SetDeskInfo) == "undefined"){
|
||||
}else{
|
||||
this.paycode = "";
|
||||
}
|
||||
this.location = _data.location;
|
||||
this.charm = _data.charm;
|
||||
this.sign = _data.sign;
|
||||
};
|
||||
|
||||
@@ -421,6 +421,8 @@ Desk.login=function(_msg){//登录
|
||||
Func.createRoom();
|
||||
}
|
||||
Game_Modify.Reconnect(_msg.data.deskinfo);
|
||||
}else{
|
||||
Game_Modify.ReconnectNoMakewar();
|
||||
}
|
||||
//}
|
||||
}else{
|
||||
|
||||
@@ -545,43 +545,49 @@ Utl.openVideo = function (_playerList, _seat, _roomcode, roomtype) {
|
||||
set_self(152, 37, 0, 0, 0);
|
||||
set_self(153, 37, 0, 0, 0);
|
||||
set_self(107, 37, 0, 0, 0);
|
||||
for (var i = 0; i < Desk.PlayerList.length; i++) {
|
||||
if (Desk.PlayerList[i].nickname != "") {
|
||||
var ind = Logic.ChangeToStatus(C_Player.seat, i);
|
||||
var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true);
|
||||
set_self(406 + ind, 7, text, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
// if (Game_Modify.updatePlayerInfoUI) {
|
||||
// for (var i = 0; i < Desk.PlayerList.length; i++) {
|
||||
// Game_Modify.updatePlayerInfoUI(i);
|
||||
// }
|
||||
// } else {
|
||||
for (var i = 0; i < Desk.PlayerList.length; i++) {
|
||||
if (Desk.PlayerList[i].nickname != "") {
|
||||
var ind = Logic.ChangeToStatus(C_Player.seat, i);
|
||||
var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true);
|
||||
set_self(406 + ind, 7, text, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
}
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
set_self(436 + ind, 7, 0, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
set_self(436 + ind, 7, 0, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
}
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
}
|
||||
} else {
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
}
|
||||
}
|
||||
Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar);
|
||||
set_group(43 + ind, 37, 1, 0, 0);
|
||||
}
|
||||
Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar);
|
||||
set_group(43 + ind, 37, 1, 0, 0);
|
||||
}
|
||||
}
|
||||
// }
|
||||
play_ani123(1, 156, 35, 255, 100, 1000, 0, 0, 1);
|
||||
Utl.playMusic();
|
||||
set_self(3141, 37, 0, 0, 0);
|
||||
|
||||
@@ -337,35 +337,35 @@ Logic.AppStart=function(){
|
||||
// 解决:覆盖全局字体渲染函数,统一使用更粗的中文友好字体
|
||||
|
||||
// 保存原始的 Canvas fillText 方法
|
||||
var originalFillText = CanvasRenderingContext2D.prototype.fillText;
|
||||
var originalStrokeText = CanvasRenderingContext2D.prototype.strokeText;
|
||||
// var originalFillText = CanvasRenderingContext2D.prototype.fillText;
|
||||
// var originalStrokeText = CanvasRenderingContext2D.prototype.strokeText;
|
||||
|
||||
// 覆盖 fillText 方法,在绘制前统一字体设置
|
||||
CanvasRenderingContext2D.prototype.fillText = function() {
|
||||
// 如果当前字体包含 'lighter' 或只有 'Arial',替换为更适合中文的字体
|
||||
if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
// 提取字体大小
|
||||
var sizeMatch = this.font.match(/(\d+)px/);
|
||||
if (sizeMatch) {
|
||||
var size = sizeMatch[1];
|
||||
// 使用 500 字重(中等粗细)+ 中文友好字体
|
||||
this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
}
|
||||
}
|
||||
return originalFillText.apply(this, arguments);
|
||||
};
|
||||
// // 覆盖 fillText 方法,在绘制前统一字体设置
|
||||
// CanvasRenderingContext2D.prototype.fillText = function() {
|
||||
// // 如果当前字体包含 'lighter' 或只有 'Arial',替换为更适合中文的字体
|
||||
// if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
// // 提取字体大小
|
||||
// var sizeMatch = this.font.match(/(\d+)px/);
|
||||
// if (sizeMatch) {
|
||||
// var size = sizeMatch[1];
|
||||
// // 使用 500 字重(中等粗细)+ 中文友好字体
|
||||
// this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
// }
|
||||
// }
|
||||
// return originalFillText.apply(this, arguments);
|
||||
// };
|
||||
|
||||
// 同样覆盖 strokeText 方法
|
||||
CanvasRenderingContext2D.prototype.strokeText = function() {
|
||||
if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
var sizeMatch = this.font.match(/(\d+)px/);
|
||||
if (sizeMatch) {
|
||||
var size = sizeMatch[1];
|
||||
this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
}
|
||||
}
|
||||
return originalStrokeText.apply(this, arguments);
|
||||
};
|
||||
// // 同样覆盖 strokeText 方法
|
||||
// CanvasRenderingContext2D.prototype.strokeText = function() {
|
||||
// if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
// var sizeMatch = this.font.match(/(\d+)px/);
|
||||
// if (sizeMatch) {
|
||||
// var size = sizeMatch[1];
|
||||
// this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
// }
|
||||
// }
|
||||
// return originalStrokeText.apply(this, arguments);
|
||||
// };
|
||||
|
||||
// console.log('[字体优化] Canvas 文字渲染已优化,中英文粗细统一');
|
||||
// ============================================================================
|
||||
@@ -1796,6 +1796,7 @@ Logic.setConfigInfo = function(){
|
||||
}
|
||||
for(var i=0;i<GameData.hallConfigName.length;i++){
|
||||
var val = get_paravalue(GameData.serverConfig,GameData.hallConfigName[i]);
|
||||
// console.log(GameData.hallConfigName[i] + val);
|
||||
if(val != null){
|
||||
GameData.hallConfig[GameData.hallConfigName[i]] = val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user