Files
youle_cocos/projects/niuniu/js/niuniu/nn_ui_data.js
T
joywayerandClaude Opus 4.8 7ab748919a chore: 纳入项目全部源码进根仓库统一管理
删除 YouleNexus 内嵌 .git,统一由根仓库唯一管理。提交:
- projects/ 旧 H5 模板 Game_Surface_3 与各子游戏源码
- cocoscreator_projects/YouleNexus 工程 + cocos-creator-mcp 扩展源码
- CLAUDE.md、.mcp.json 等配置
library/temp/node_modules/dist 等缓存由 .gitignore 排除。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 11:55:13 +08:00

1014 lines
32 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//牛牛游戏界面精灵配置
var NN_Sprite = NN_Sprite || {};
//精灵实例列表
NN_Sprite.list = [];
//是否初始化标识
NN_Sprite.isInit = false;
//初始化全部精灵
NN_Sprite.init = function(){
//
set_self(1510, 37, 1, 0, 0);
//创建所需精灵
if(!this.isInit){
for(var i = 0; i < this.list.length; i ++){
if(this.list[i]){
this.list[i].initSprite();
}
}
this.isInit = true;
}
};
//清除动态创建的精灵
NN_Sprite.clear = function(o_sprite){
if(o_sprite){ //清除单个类精灵
o_sprite.distroySprite();
}else{
for(var i = 0; i < this.list.length; i ++){
if(this.list[i]){
this.list[i].distroySprite();
}
}
this.isInit = false;
}
};
//隐藏精灵
NN_Sprite.hide = function(){
};
//创建新的精灵实例
NN_Sprite.New = function (obj_name, obj) {
//创建新实例
var o_new = new NN_Spid ();
//实例赋值传入对象属性
for (var sx in obj){
o_new[sx] = obj[sx];
}
//
NN_Sprite[obj_name] = o_new;
//添加进精灵实例列表
NN_Sprite.list.push(o_new);
return o_new;
};
//游戏精灵构造函数
function NN_Spid (){
this.idList = []; //精灵id列表
this.size = []; //尺寸
this.mySize = []; //尺寸
this.position = []; //相对其他精灵位 置(数组形式与idList对应)
this.relvSpid = []; //位置相对精灵列表
this.addSprInfo = []; //创建精灵所需书数据[父精灵,复制精灵,x坐标,y坐标,起始标识]
this.onePerSprNum = 1; //一个玩家对应创建几个精灵
this.tagList = []; //创建精灵标识列表(用于删除创建精灵)
//this.relvSpid = []; //位置相对精灵列表
// this.fSpid = null; //父精灵
// this.copySpid = null; //子精灵
// this.tag = null; //创建精灵起始自定义标识值(fspid+'add'+tag)
// this.initPos = []; //创建精灵的初始位置
// this.stage = 0; //阶段
}
//玩家人数
NN_Spid.prototype.person = 5;
//创建精灵
NN_Spid.prototype.initSprite = function(){
//创建精灵
if(this.idList.length == 0 && this.addSprInfo.length > 0){
this.tagList = [];
var spid = 0;
for(var i = 0; i < this.person; i ++){
if(this.idList[i] == null){ //无预设id,创建新精灵
if(this.onePerSprNum > 1){ //一人对应多个精灵时二维数组
this.idList[i] = [];
}
for(var j = 0; j < this.onePerSprNum; j ++){
this.tagList.push(this.addSprInfo[4] + i * this.onePerSprNum + j);
if(typeof this.addSprInfo[0] == "object"){
spid = ifast_addtospritefromspritecopy(this.addSprInfo[0][i], this.addSprInfo[1], this.addSprInfo[2], this.addSprInfo[3], this.tagList[this.tagList.length - 1]);
} else {
spid = ifast_addtospritefromspritecopy(this.addSprInfo[0], this.addSprInfo[1], this.addSprInfo[2], this.addSprInfo[3], this.tagList[this.tagList.length - 1]);
}
//记录精灵创建后id
if(this.onePerSprNum > 1){
this.idList[i][j] = spid;
//设置坐标
if(this.position.length > 0){
set_self(spid, 18, this.position[i][j], 0, 0);
set_self(spid, 19, this.position[i][j], 0, 0);
}
}else {
this.idList[i] = spid;
//设置坐标
if(this.position.length > 0){
set_self(spid, 18, this.position[i], 0, 0);
set_self(spid, 19, this.position[i], 0, 0);
}
}
//隐藏
set_self(spid, 37, 0, 0, 0);
//宽高设置
if(this.size.length > 0){
set_self(spid, 20, this.size[0], 0, 0);
set_self(spid, 21, this.size[1], 0, 0);
}
}
}
}
}
};
//创建精灵
//NN_Spid.prototype.initPosition = function(){
//if(this.position.length > 0){
//for(var i = 0; i < this.idList.length; i ++){
//}
//this.position = []; //相对其他精灵位置(数组形式与isList对应)
//}
//};
//清除创建的精灵
NN_Spid.prototype.distroySprite = function(){
if(this.idList.length > 0){
//有精灵标识列表,清理列表对应精灵
if(this.tagList.length > 0){
for (var i = 0; i < this.tagList.length; i ++){
ifast_dllpritefromspritecopy(this.addSprInfo[0], this.tagList[i]);
this.idList[this.tagList[i] - this.addSprInfo[4]] = null;
}
this.tagList = [];
}else {
return ;
//精灵全部为动态创建时可执行
if(this.idList.length > 0){
for (var i = 0; i < this.person; i ++){
for (var j = 0; j < this.onePerSprNum; j ++){
ifast_dllpritefromspritecopy(this.addSprInfo[0], this.addSprInfo[4] + i * this.onePerSprNum + j);
}
}
this.idList = [];
}
}
}
};
//隐藏及显示精灵 isShow:为空或1时显示,为0隐藏
NN_Spid.prototype.show = function(wz, isShow){
if(this.idList.length > 0){
if(isShow == null){
isShow = 1;
}
if(wz >= 0){
if(typeof this.idList[wz] == "object"){
for(var i = 0; i < this.idList[wz].length; i++){
set_self(this.idList[wz][i], 37, isShow, 0, 0);
}
}else {
set_self(this.idList[wz], 37, isShow, 0, 0);
}
}else {
for(var i = 0; i < this.idList.length; i++){
if(typeof this.idList[i] == "object"){
for(var j = 0; j < this.idList[i].length; j++){
set_self(this.idList[i][j], 37, isShow, 0, 0);
}
}else {
set_self(this.idList[i], 37, isShow, 0, 0);
}
}
}
}
};
//设置坐标 space:一对多图片时的间隔
NN_Spid.prototype.setPosition = function(wz, x, y, space){
if(this.idList.length > 0 && wz >= 0){
var rPos = [0, 0];
if(this.relvSpid != null){
rPos = [get_self(this.relvSpid[wz], 18), get_self(this.relvSpid[wz], 19)];
}
if(typeof this.idList[wz] == "object"){
if(space == null){
space = 0;
}
for(var i = 0; i < this.idList[wz].length; i++){
if(x != null){
set_self(this.idList[wz][i], 18, rPos[0] + x + space * i, 0, 0);
set_self(this.idList[wz][i], 19, rPos[1] + y, 0, 0);
}else if(typeof this.position[wz] == "object"){
set_self(this.idList[wz][i], 18, rPos[0] + this.position[wz][0] + this.position[wz][2] * i, 0, 0);
set_self(this.idList[wz][i], 19, rPos[1] + this.position[wz][1], 0, 0);
}else if(typeof this.position[wz] == "number"){
set_self(this.idList[wz][i], 18, rPos[0] + this.position[0] + this.position[2] * i, 0, 0);
set_self(this.idList[wz][i], 19, rPos[1] + this.position[1], 0, 0);
}
}
}else {
if(x != null){
set_self(this.idList[wz], 18, rPos[0] + x, 0, 0);
set_self(this.idList[wz], 19, rPos[1] + y, 0, 0);
}else if(typeof this.position[wz] == "object"){
set_self(this.idList[wz], 18, rPos[0] + this.position[wz][0], 0, 0);
set_self(this.idList[wz], 19, rPos[1] + this.position[wz][1], 0, 0);
}else if(typeof this.position[wz] == "number"){
set_self(this.idList[wz], 18, rPos[0] + this.position[0], 0, 0);
set_self(this.idList[wz], 19, rPos[1] + this.position[1], 0, 0);
}
}
}
};
//获取创建的精灵id
NN_Spid.prototype.setSize = function(wz, w, h){
if(this.idList.length > 0 && wz >= 0){
var spid;
if(typeof this.idList[wz] == "object"){
spids = this.idList[wz];
}else {
spids = [this.idList[wz]];
}
for(var i = 0; i < spids.length; i++){
if(w != null && h != null){
set_self(spids[i], 20, w, 0, 0);
set_self(spids[i], 21, h, 0, 0);
}else if(this.size){
if(typeof this.size[0] == "number"){
set_self(spids[i], 20, this.size[0], 0, 0);
set_self(spids[i], 21, this.size[1], 0, 0);
}else if(typeof this.position[0] == "object"){
set_self(spids[i], 20, this.size[wz][0], 0, 0);
set_self(spids[i], 21, this.size[wz][1], 0, 0);
}
}
}
}
};
//获取创建的精灵id
NN_Spid.prototype.getSpriteId = function(wz, many){
if(this.idList[wz] != null){
if(many != null){
return this.idList[wz][many];
}else {
return this.idList[wz];
}
}
};
/////////////////////////////////////////////////////////////////
///////////////////////////游戏精灵配置//////////////////////////
/////////////////////////////////////////////////////////////////
//创建房间时初始化配置数据
NN_Sprite.init_OnCreateDesk = function(roomtype){
if(roomtype[5] && roomtype[5][5] == 1){ //10人局
//框架相关显示
NN_Sprite.mainScence.playersInfo_10.init();
//if(roomtype[5][1] == 1){
//NN_UIP.mainScence.init(10, 1);
//}else{
//NN_UIP.mainScence.init(10);
//}
var score_x = [get_self(346, 18) + 130, get_self(34, 18) + 50];
//框架相关配置
Game_Config.Max.PlayerCnt = 10; //房间最大人数
Game_Config.Info.textwidth_1 = 7; //昵称文字的宽度
Game_Config.Info.textwidth_2 = 11; //分数文字的宽度
Game_Config.Info.myPosition = get_self(346, 18) + 130;//自己信息对齐点(根据游戏界面自行修改)
Game_Config.Info.position = [get_self(347, 18) + 50, get_self(348, 18) + 50, get_self(349, 18) + 50,
get_self(350, 18) + 130, get_self(351, 18) + 130, get_self(352, 18) + 130,
get_self(353, 18) + 50, get_self(354, 18) + 50, get_self(355, 18) + 50];
//聊天气泡
Game_Config.Chat.ChatDis = [30,11]; //聊天气泡与内容的间隔0位置左右间隔(最好不要低于30)1位置上下间隔
Game_Config.Chat.isLeft = [1,0,0,0,1,1,1,1,1,1]; //聊天气泡是否为以左边为基准线
Game_Config.Chat.ChatLoc = [[166,556],[1241,435],[1264,265],[1215,106],[782,3],[546,55],[310,3],[62,108],[15,265],[39,435]];//聊天气泡的基准点位置(注意是基准点位置!)
//语音气泡
Game_Config.Voice.VoiceDis = [30,15]; //语音气泡与内容的间隔0位置左右间隔(最好不要低于30)1位置上下间隔
Game_Config.Voice.isLeft = [1,0,0,0,0,0,0,1,1,1]; //气泡是否为以左边为基准线
Game_Config.Voice.VoiceLoc = [[168,556],[1138,435],[1163,265],[1112,106],[807,3],[571,3],[330,3],[165,108],[115,265],[139,435]];//气泡的基准点位置(注意是基准点位置!)
}else{ //5人
//框架相关显示
NN_Sprite.mainScence.playersInfo_5.init();
//NN_UIP.mainScence.init(5);
//框架相关配置
Game_Config.Max.PlayerCnt = 5; //房间最大人数
Game_Config.Info.textwidth_1 = 7; //昵称文字的宽度
Game_Config.Info.textwidth_2 = 11; //分数文字的宽度
Game_Config.Info.myPosition = 194; //自己信息对齐点(根据游戏界面自行修改)
Game_Config.Info.position = [1195,1195,85,85];
//游戏内聊天配置信息
Game_Config.Chat.ChatDis = [30,11]; //聊天气泡与内容的间隔0位置左右间隔(最好不要低于30)1位置上下间隔
Game_Config.Chat.isLeft = [1,0,0,1,1]; //聊天气泡是否为以左边为基准线
Game_Config.Chat.ChatLoc = [[35,517],[1100,315],[1100,105],[175,105],[175,315]];//聊天气泡的基准点位置
//游戏内聊天配置信息
Game_Config.Voice.VoiceDis = [30,15]; //语音气泡与内容的间隔0位置左右间隔(最好不要低于30)1位置上下间隔
Game_Config.Voice.isLeft = [1,0,0,1,1]; //气泡是否为以左边为基准线
Game_Config.Voice.VoiceLoc = [[35,517],[1100,315],[1100,105],[175,105],[175,315]];//气泡的基准点位置
}
};
//游戏内框架内容调整
NN_Sprite.mainScence = {
init: function(personMax, isBean){
if(personMax == 10){
//替换背景图
set_self(149, 1, 595, 0, 0);
set_self(284, 1, 618, 0, 0); //时间背景
//NN_Sprite.mainScence.playersInfo_10.init(); //初始化玩家头像
}else {
//替换背景图
set_self(149, 1, 66, 0, 0);
set_self(284, 1, 67, 0, 0); //时间背景
//NN_Sprite.mainScence.playersInfo_5.init();//初始化玩家头像
}
//玩家房号及房间类型显示
this.roomInfo(personMax);
//按钮显示
this.btn(personMax, isBean);
//桌
this.deskInfo(personMax);
},
//玩家房号及房间类型显示
roomInfo: function(personMax){
var spids_show, //精灵列表 [精灵id,x, y] 显示
spids_hide; //隐藏的精灵
if(personMax == 10){
spids_show = [
//[1501, 8, 4], //10人背景条
//[284, 87, 0, 225, 47], //背景条
//[336, 101, 9], //手机信号显示
//[338, 147, 11], //电量显示
//[337, 147, 11], //电量显示
//[154, 208, 9], //小时
//[156, 254, 12], //点
//[155, 262, 9], //分钟
//[1501, 87, 4], //信息框
//1502, 1503, 1504, //中间局数及房间类型显示
//[1504, 450, 236], //房间类型
//[107, 15, 3] //按钮栏
];
spids_hide = [1501, 291];
}else {
spids_show = [
//[336, 101, 9], //手机信号显示
//[338, 147, 11], //电量显示
//[337, 147, 11], //电量显示
//[154, 208, 9], //小时
//[156, 254, 12], //点
//[155, 262, 9], //分钟
//[284, 0 + 87, 0, 225, 47], //背景条
//[107, 15, 3] //按钮栏
];//[291, 239 + 87, 4], //房间号
spids_hide = [1501, 1502, 1503, 1504];
}
//显示
for (var i = 0; i < spids_show.length; i++){
if(typeof spids_show[i] == "object"){
set_self(spids_show[i][0], 18, spids_show[i][1], 0, 0);
set_self(spids_show[i][0], 19, spids_show[i][2], 0, 0);
if(spids_show[i][3] != null){
set_self(spids_show[i][0], 20, spids_show[i][3], 0, 0);
}
if(spids_show[i][4] != null){
set_self(spids_show[i][0], 21, spids_show[i][4], 0, 0);
}
set_self(spids_show[i][0], 37, 1, 0, 0);
}else {
set_self(spids_show[i], 37, 1, 0, 0);
}
}0
//隐藏
for (var i = 0; i < spids_hide.length; i++){
set_self(spids_hide[i], 37, 0, 0, 0);
}
},
//按钮显示
btn: function(personMax, isBean){
var btnList;
if(personMax == 10){
btnList = [[569, 490, 194], //分享平台
//[195, 393, 324], //邀请奖励
[183, 490, 284], //邀请好友
[515, 548, 403], //准备
[184, 548, 491], //开始
//横条
//[3143, 269, 284], //背景
//[3147, 499, 296], //房号
//[3146, 570, 298], //房号值
//[3145, 314, 268], //退出
//[3144, 821, 268], //解散
//[3151, 675, 276], //复制房号
[107, 0, -11], //设置
[152, 1093, 634], //语音
[153, 1185, 634], //聊天
[3115, 1119, 596], //聊天框
[3118, 1245, 624], //聊天红点
[3119, 1249, 627], //聊天数
[954, 44, 619], //机器人
//[389, 271, 148], //滚动信息背景
//[390, 628, 150] //滚动信息
];
//判断分享平台按钮有没有显示
//if(isBean && GameData.hallConfig.shareButton){
//btnList[0] = [569, 330, 384]; //分享平台
//btnList[1] = [183, 650, 384]; //邀请好友
//}
//是否需要准备
//if(Desk.needprepare != 1){
//btnList[3] = [184, 554, 480]; //开始
//}
//无限局调整
if(Utl.getIsInfinite() == 1){
btnList[2] = [515, 548, 450]; //准备
//btnList[6] = [233, 424, 495]; //退出
//btnList[4] = [3014, 645, 495]; //换房间
}
//if(get_self(656, 37) == 1){
//btnList[3] = [512, 654, 635];
//btnList[4] = [656, 430, 635];
//}
}else{
btnList = [[569, 490, 194], //分享平台
//[195, 393, 324], //邀请奖励
[183, 490, 284], //邀请好友
[515, 548, 403], //准备
[184, 548, 491], //开始
//横条
//[3143, 269, 284 - 54], //背景
//[3147, 499, 296 - 54], //房号
//[3146, 570, 298 - 54], //房号值
//[3145, 314, 268 - 54], //退出
//[3144, 821, 268 - 54], //解散
//[3151, 675, 276 - 54], //复制房号
[107, 0, -11], //设置
[152, 1155, 520], //语音
[153, 1155, 625], //聊天
[3115, 1080, 595], //聊天框
[3118, 1220, 622], //聊天红点
[3119, 1220, 625], //聊天数
[954, 160, 495], //邀请好友
//[389, 251, 42], //滚动信息背景
//[390, 608, 44] //滚动信息
];
//无限局调整
if(Utl.getIsInfinite() == 1){
btnList[2] = [515, 548, 397]; //准备
//btnList[6] = [233, 424, 495]; //退出
//btnList[4] = [3014, 645, 495]; //换房间
}
}
//位置调整
for (var i = 0; i < btnList.length; i++){
set_self(btnList[i][0], 18, btnList[i][1], 0, 0);
set_self(btnList[i][0], 19, btnList[i][2], 0, 0);
}
},
//桌界面相关
deskInfo: function(personMax){
var sList;
if(personMax == 10){
sList = [[[701, null, 300], //第几局
[702, null, 234], //第几局
[891, null, 319], //开始
[703, 599, 318], //计时器
[704, 620, 363], //计时器
[956, 788, 390] //不加注按钮
]];
//无限局-计时器位置调整
//if(Utl.getIsInfinite()){
//sList[0][3] = [703, 599, 238]; //计时器
//sList[0][4] = [704, 620, 283]; //计时器
//}
}else{
sList = [[[701, null, 250], //第几局
[702, null, 248], //第几局
[891, null, 274], //开始
[703, 599, 208], //计时器
[704, 620, 253], //计时器
[956, 555, 323]], //不加注按钮
[[784, 606, 474],[785, 999, 372],[786, 999, 165],[787, 198, 165],[788, 198, 372]], //抢庄状态
[[770, 942, 436],[771, 942, 231],[772, 203, 231],[773, 203, 436]] //摆牌中
//[[, , ],[, , ],[, , ],[, , ],[, , ]],
];
}
for (var i = 0; i < sList.length; i++){
for (var j = 0; j < sList[i].length; j++){
if(sList[i][j][1] != null){
set_self(sList[i][j][0], 18, sList[i][j][1], 0, 0);
}
if(sList[i][j][2] != null){
set_self(sList[i][j][0], 19, sList[i][j][2], 0, 0);
}
}
}
},
};
//初始化玩家头像相关显示(10人局)
NN_Sprite.mainScence.playersInfo_10 = {
//头像框
headFrame: {
spids: [346, 347, 348, 349, 350, 351, 352, 353, 354, 355],
pos: [[163, 608], [1142, 458], [1165, 284], [1113, 114], [781, 7], [546, 7], [310, 7], [63, 114], [13, 284], [37, 458]],
size: [[180, 100],[100, 150]],
},
//头像
head: {
spids: [376, 377, 378, 379, 380, 381, 382, 383, 384, 385],
rPos: [[11 , 13], [13, 11]], //relativePos相对头像框坐标[横, 竖]
size: [75, 75]
},
//昵称
nickname: {
spids: [406, 407, 408, 409, 410, 411, 412, 413, 414, 415],
rPos: [[93, 22], [12, 92]], //相对头像框
},
//分数
score: {
spids: [436, 437, 438, 439, 440, 441, 442, 443, 444, 445],
rPos: [[112, 54], [31, 116]], //相对头像框
},
//表情动画底
expressionBtm: {
spids: [468, 469, 470, 471, 472, 473, 474, 475, 476, 477],
rPos: [26, 604], //相对头像
size: [90, 94]
},
//互动动画
expression: {
spids: [498, 499, 500, 501, 502, 503, 504, 505, 506, 507],
rPos: [28, 603], //相对头像
size: [90, 90]
},
//语音气泡
//文字气泡
//初始化玩家信息显示位置
init: function(){
var kind = [], fspid_x = 0, fspid_y = 0;
for (var i = 0; i < 10; i ++){
fspid_x = this.headFrame.pos[i][0];
fspid_y = this.headFrame.pos[i][1];
//头像框
set_self(this.headFrame.spids[i], 18, fspid_x,0,0);
set_self(this.headFrame.spids[i], 19, fspid_y,0,0);
//头像宽高
set_self(this.head.spids[i], 20, this.head.size[0],0,0);
set_self(this.head.spids[i], 21, this.head.size[1],0,0);
if(i == 0 || i == 4 || i == 5 || i == 6){
set_self(this.headFrame.spids[i], 20, this.headFrame.size[0][0],0,0);
set_self(this.headFrame.spids[i], 21, this.headFrame.size[0][1],0,0);
//头像
set_self(this.head.spids[i], 18, fspid_x + this.head.rPos[0][0],0,0);
set_self(this.head.spids[i], 19, fspid_y + this.head.rPos[0][1],0,0);
//昵称
set_self(this.nickname.spids[i], 18, fspid_x + this.nickname.rPos[0][0],0,0);
set_self(this.nickname.spids[i], 19, fspid_y + this.nickname.rPos[0][1],0,0);
//分数
set_self(this.score.spids[i], 18, fspid_x + this.score.rPos[0][0],0,0);
set_self(this.score.spids[i], 19, fspid_y + this.score.rPos[0][1],0,0);
}else {
set_self(this.headFrame.spids[i], 20, this.headFrame.size[1][0],0,0);
set_self(this.headFrame.spids[i], 21, this.headFrame.size[1][1],0,0);
//头像
set_self(this.head.spids[i], 18, fspid_x + this.head.rPos[1][0],0,0);
set_self(this.head.spids[i], 19, fspid_y + this.head.rPos[1][1],0,0);
//昵称
set_self(this.nickname.spids[i], 18, fspid_x + this.nickname.rPos[1][0],0,0);
set_self(this.nickname.spids[i], 19, fspid_y + this.nickname.rPos[1][1],0,0);
//分数
set_self(this.score.spids[i], 18, fspid_x + this.score.rPos[1][0],0,0);
set_self(this.score.spids[i], 19, fspid_y + this.score.rPos[1][1],0,0);
}
//表情动画底
set_self(this.expressionBtm.spids[i], 18, get_self(this.head.spids[i], 18) + this.expressionBtm.rPos[0],0,0);
set_self(this.expressionBtm.spids[i], 19, get_self(this.head.spids[i], 19) + this.expressionBtm.rPos[0],0,0);
set_self(this.expressionBtm.spids[i], 20, this.expressionBtm.size[0],0,0);
set_self(this.expressionBtm.spids[i], 21, this.expressionBtm.size[1],0,0);
//互动动画
set_self(this.expression.spids[i], 18, get_self(this.head.spids[i], 18) + this.expression.rPos[0],0,0);
set_self(this.expression.spids[i], 19, get_self(this.head.spids[i], 19) + this.expression.rPos[0],0,0);
set_self(this.expression.spids[i], 20, this.expression.size[0],0,0);
set_self(this.expression.spids[i], 21, this.expression.size[1],0,0);
//测试----------------------------------------------------
//set_self(this.headFrame.spids[i], 37, 1,0,0);
//set_self(this.head.spids[i], 37, 1,0,0);
//set_self(this.nickname.spids[i], 37, 1,0,0);
//set_self(this.score.spids[i], 37, 1,0,0);
}
}
};
//初始化玩家头像相关显示(5人局)
NN_Sprite.mainScence.playersInfo_5 = {
//头像框
headFrame: {
spids: [346, 347, 348, 349, 350, 351, 352, 353, 354, 355],
pos: [[20, 597], [1130, 304], [1130, 96], [20, 96], [20, 304], [0, -500], [0, -500], [0, -500], [0, -500], [0, -500]],
size: [[246, 112],[130, 180]],
},
//头像
head: {
spids: [376, 377, 378, 379, 380, 381, 382, 383, 384, 385],
pos: [[32, 607], [1148, 317], [1148, 109], [38, 109], [38, 317], [0, -500], [0, -500], [0, -500], [0, -500], [0, -500]],
size: [93, 93]
},
//昵称
nickname: {
spids: [406, 407, 408, 409, 410, 411, 412, 413, 414, 415],
pos: [[149, 620], [1159, 420], [1159, 212], [49, 212], [49, 420], [0, -500], [0, -500], [0, -500], [0, -500], [0, -500]],
},
//分数
score: {
spids: [436, 437, 438, 439, 440, 441, 442, 443, 444, 445],
pos: [[173, 662], [1175, 449], [1179, 241], [65, 241], [65, 449], [0, -500], [0, -500], [0, -500], [0, -500], [0, -500]],
},
//表情动画底
expressionBtm: {
spids: [468, 469, 470, 471, 472, 473, 474, 475, 476, 477],
pos: [[26, 604], [1142, 314], [1142, 106], [32, 106], [32, 314], [0, -500], [0, -500], [0, -500], [0, -500], [0, -500]],
size: [105, 99]
},
//互动动画
expression: {
spids: [498, 499, 500, 501, 502, 503, 504, 505, 506, 507],
pos: [[28, 603], [1144, 313], [1144, 105], [34, 105], [34, 313], [0, -500], [0, -500], [0, -500], [0, -500], [0, -500]],
size: [100, 100]
},
//语音气泡
//文字气泡
//初始化玩家信息显示位置
init: function(count){
for (var i = 0; i < 10; i ++){
//头像框
set_self(this.headFrame.spids[i], 18, this.headFrame.pos[i][0],0,0);
set_self(this.headFrame.spids[i], 19, this.headFrame.pos[i][1],0,0);
if(i == 0){
set_self(this.headFrame.spids[i], 20, this.headFrame.size[0][0],0,0);
set_self(this.headFrame.spids[i], 21, this.headFrame.size[0][1],0,0);
}else {
set_self(this.headFrame.spids[i], 20, this.headFrame.size[1][0],0,0);
set_self(this.headFrame.spids[i], 21, this.headFrame.size[1][1],0,0);
}
//头像
set_self(this.head.spids[i], 18, this.head.pos[i][0],0,0);
set_self(this.head.spids[i], 19, this.head.pos[i][1],0,0);
set_self(this.head.spids[i], 20, this.head.size[0],0,0);
set_self(this.head.spids[i], 21, this.head.size[1],0,0);
//昵称
set_self(this.nickname.spids[i], 18, this.nickname.pos[i][0],0,0);
set_self(this.nickname.spids[i], 19, this.nickname.pos[i][1],0,0);
//分数
set_self(this.score.spids[i], 18, this.score.pos[i][0],0,0);
set_self(this.score.spids[i], 19, this.score.pos[i][1],0,0);
//表情动画底
set_self(this.expressionBtm.spids[i], 18, this.expressionBtm.pos[i][0],0,0);
set_self(this.expressionBtm.spids[i], 19, this.expressionBtm.pos[i][1],0,0);
set_self(this.expressionBtm.spids[i], 20, this.expressionBtm.size[0],0,0);
set_self(this.expressionBtm.spids[i], 21, this.expressionBtm.size[1],0,0);
//互动动画
set_self(this.expression.spids[i], 18, this.expression.pos[i][0],0,0);
set_self(this.expression.spids[i], 19, this.expression.pos[i][1],0,0);
set_self(this.expression.spids[i], 20, this.expression.size[0],0,0);
set_self(this.expression.spids[i], 21, this.expression.size[1],0,0);
//显示
//set_self(this.headFrame.spids[i], 37, 1,0,0);
//set_self(this.head.spids[i], 37, 1,0,0);
//set_self(this.nickname.spids[i], 37, 1,0,0);
//set_self(this.score.spids[i], 37, 1,0,0);
//set_self(this.expressionBtm.spids[i], 37, 1,0,0);
//set_self(this.expression.spids[i], 37, 1,0,0);
}
}
};
/*
NN_Sprite.New("card", {
idList : [], //精灵id列表
size : [], //尺寸
position : [], //相对其他精灵位置(数组形式与isList对应)
addSprInfo : [], //创建精灵所需书数据[父精灵,复制精灵,x坐标,y坐标,起始标识]
onePerSprNum : 1, //一个玩家对应创建几个精灵
});
*/
NN_Sprite.headFrame = [346, 347, 348, 349, 350, 351, 352, 353, 354, 355];
//玩家手牌
NN_Sprite.New("card", {
idList : [[725, 726, 727, 728, 729], [730, 731, 732, 733, 734], [735, 736, 737, 738, 739], [740, 741, 742, 743, 744], [745, 746, 747, 748, 749],
[1513, 1514, 1515, 1516, 1517], [1518, 1519, 1520, 1521, 1522], [1523, 1524, 1525, 1526, 1527], [1528, 1529, 1530, 1531, 1532], [1533, 1534, 1535, 1536, 1537]],
size : [54, 73],
mySize : [108, 144],
relvSpid: NN_Sprite.headFrame,
position: [[212, -45, 107], [-166, 56, 27], [-166, 56, 27],[-166, 62, 27],[10, 101, 27],[10, 101, 27],[10, 101, 27],[108, 62, 27],[108, 56, 27],[108, 50, 27]],
myPutPos: [395, -95, 27]
});
//翻牌动画
NN_Sprite.New("turnCardAnim", {
idList : [[750, 751], [752, 753], [754, 755], [756, 757], [757, 758], [1538, 1539], [1540, 1541], [1542, 1543], [1544, 1545], [1546, 1547]],
size : [54, 73],
mySize : [104, 144]
});
//
//牌型背景
NN_Sprite.New("cardTypeBmp", {
idList: [764, 765, 766, 767, 768, 1556, 1557, 1558, 1559, 1560],
size: [180, 50],
relvSpid: [725, 730, 735, 740, 745, 1513, 1518, 1523, 1528, 1533],
position: [-8, 46]
//addSprInfo : [1510, 1548, 0, 0, 1]
});
//具体牌型
NN_Sprite.New("cardType", {
idList: [774, 775, 776, 777, 778, 1561, 1562, 1563, 1564, 1565],
common: [[88, 46], [19, 1]], //普通牌型(倍数>1)
special:[[110, 55], [-1, -8]], //特殊牌型
bomb: [[120, 100], [-2, -22]], //炸弹牌型
noCattle: [[90, 46], [42, 1]], //无牛
relvSpid: [764, 765, 766, 767, 768, 1556, 1557, 1558, 1559, 1560],
position: [42, 0]
//addSprInfo : [1510, 1549, 0, 0, 11]
});
//牌型倍文字
NN_Sprite.New("cardTypeMult", {
idList: [779, 780, 781, 782, 783, 1571, 1572, 1573, 1574, 1575],
//addSprInfo : [1510, 1550, 0, 0, 21]
size: [32, 32],
relvSpid: [764, 765, 766, 767, 768, 1556, 1557, 1558, 1559, 1560],
position: [145, 8]
});
//牌型倍数数值
NN_Sprite.New("cardTypeMultVal", {
idList: [982, 983, 984, 985, 986, 1566, 1567, 1568, 1569, 1570],
//addSprInfo : [1510, 1551, 0, 0, 31]
size: [20, 32],
relvSpid: [764, 765, 766, 767, 768, 1556, 1557, 1558, 1559, 1560],
position: [106, 8]
});
//无牛遮罩
NN_Sprite.New("noNiuMask", {
idList: [906, 907, 908, 909, 910, 1551, 1552, 1553, 1554, 1555],
//addSprInfo : [1510, 1556, 0, 0, 41]
size: [161, 72]
});
//玩家已下注金币图标
NN_Sprite.New("betGoldIcon", {
idList: [1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675],
size: [44, 47],
relvSpid: [1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645],
position: [-22, -2]
});
//玩家已下注背景
NN_Sprite.New("betBmp", {
idList: [1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645],
//addSprInfo: [1510, 1511, 0, 0, 51],
size: [108, 40],
relvSpid: NN_Sprite.headFrame,
position: [[429, -147], [-112, 0], [-112, 0],[-112, 0],[10, 62],[6, 62],[4, 62],[125, 0],[125, 0],[125, 0]]
});
//玩家已下注值
NN_Sprite.New("betVal", {
idList: [1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655],
size: [19, 28],
//addSprInfo : [1510, 1512, 0, 0, 61]
});
//抢庄状态
NN_Sprite.New("robState", {
idList: [784, 785, 786, 787, 788, 1576, 1577, 1578, 1579, 1580],
//addSprInfo : [1510, 1552, 0, 0, 71],
relvSpid: NN_Sprite.headFrame,
position: [[437, -190], [-100, 5], [-100, 5], [-100, 5], [51, 115], [51, 115], [51, 115], [133, 5], [133, 5], [133, 5]],
posModel5: [[437, -190], [-250, 55], [-250, 55], [-246, 77], [51, 115], [51, 115], [51, 115], [255, 77], [255, 53], [255, 53]] //下注抢庄模式显示位置
});
//加注文字
NN_Sprite.New("addBet", {
idList: [988, 989, 990, 991, 992, 1586, 1587, 1588, 1589, 1590],
size: [86, 30],
//addSprInfo : [1510, 1553, 0, 0, 81]
relvSpid: [1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645],
position: [[4, 5], [-127, 5], [-127, 5],[-127, 5],[4, 5],[4, 5],[4, 5],[4, 5],[4, 5],[4, 5]]
});
//加注值
NN_Sprite.New("addBetVal", {
idList: [993, 994, 995, 996 ,997, 1591, 1592, 1593, 1594, 1595],
//addSprInfo : [1510, 1554, 0, 0, 91]
relvSpid: [988, 989, 990, 991, 992, 1586, 1587, 1588, 1589, 1590],
size: [21, 30],
position: [60, 1]
});
//搓摆牌中
NN_Sprite.New("onRobPut", {
idList: [1702, 770, 771, 772, 773, 1581, 1582, 1583, 1584, 1585],
//addSprInfo : [1510, 1555, 0, 0, 101],
relvSpid: [346, 730, 735, 740, 745, 1513, 1518, 1523, 1528, 1533],
position: [[281, 45], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39]]
});
//赢分动画
NN_Sprite.New("winAnim", {
idList: [1656, 1660, 1661, 1662, 1657, 1658, 1659, 1663, 1664, 1665],
relvSpid: NN_Sprite.headFrame,
position: [[-85, -50], [-75, -85], [-75, -85], [-75, -85], [-85, -50], [-85, -50], [-85, -50], [-75, -85], [-75, -85], [-75, -85]]
});
//小局结算赢取分数 settlement
NN_Sprite.New("settScoreBg", {
idList: [911, 912, 913, 914, 915, 1596, 1597, 1598, 1599, 1600],
size: [190, 92],
relvSpid: [376, 377, 378, 379, 380, 381, 382, 383, 384, 385],
position: [[-62, -20], [-62, -20], [-62, -20], [-62, -20], [-62, -20], [-62, -20], [-62, -20], [-62, -20], [-62, -20], [-62, -20]]
});
//小局结算分数加减符号
NN_Sprite.New("settAddSub", {
idList: [831, 832, 833, 834, 835, 1601, 1602, 1603, 1604, 1605],
relvSpid: NN_Sprite.settScoreBg.idList,
position: [[281, 45], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39]],
size: [27, 27],
});
//小局结算赢取分数
NN_Sprite.New("settWinScore", {
idList: [841, 842, 843, 844, 845, 1606, 1607, 1608, 1609, 1610],
relvSpid: NN_Sprite.settAddSub.idList,
position: [[281, 45], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39]],
size: [28, 38],
smallSize: [25, 34],
});
//小局结算输分数
NN_Sprite.New("settLoseScore", {
idList: [836, 837, 838, 839, 840, 1611, 1612, 1613, 1614, 1615],
relvSpid: NN_Sprite.settAddSub.idList,
position: [[281, 45], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39], [19, 39]],
size: [28, 38],
smallSize: [25, 34],
});
//操作提示
NN_Sprite.tipsOpt = 1511;
//点三张牌选牛提示背景
NN_Sprite.selectCardTipsBmp = 1701;
//点三张牌选牛提示
NN_Sprite.selectCardTips = 1702;
//手指
NN_Sprite.finger = 1703;
//庄图标
NN_Sprite.zhuang = {
id: 1707,
relvSpid: NN_Sprite.headFrame,
position: [[-33, -14],[58, -23],[48, -32],[58, -23],[-37, -13],[-37, -13],[-37, -13],[-32, -34],[-20, -33],[-30, -30]]
};
//选庄动画图
NN_Sprite.selectZhuang = {
idList: [1704, 1705],
relvSpid: NN_Sprite.headFrame,
position: [[-8, -6], [-10, -8]]
};
//庄背景框
NN_Sprite.zhuangBg = {
id: 890,
relvSpid: NN_Sprite.headFrame,
size: [[223, 140], [140, 192]],
position: [-20, -20]
};
//确定庄动画
NN_Sprite.zhaungAnim = {
id: 1706,
relvSpid: NN_Sprite.zhuang.id,
position: [-61, -65]
};
//按钮精灵
NN_Sprite.btn = {
//抢庄按钮
rob: 1708,
robPos: [[718, 340], [698, 340]],
//不抢庄按钮
noRob: 1709,
noRobPos: [[345, 340], [365, 340]],
//有牛按钮
sureCattle: 1710,
//无牛按钮
noCattle: 1711,
};
//桌信息精灵
NN_Sprite.deskInfo = {
bmp: 1502, //背景框
count: 1503, //局数
typeDes: 1504, //房间类型描述
};
//星星相关
NN_Sprite.star = {
icon: 976,
des: 980
};
//强制下注描述
NN_Sprite.forceBetDes = 987;