This commit is contained in:
杨存峰
2019-02-18 16:19:25 +08:00
parent 96b519aba8
commit 5d415fe6a7
26 changed files with 5397 additions and 4358 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,7 @@
{
"ver": "1.0.0",
"uuid": "b1a3242c-6595-42df-a0fc-e177f727763d",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -24,6 +24,7 @@ cc.Class({
},
//web socket连接
wsstart:function(){
return false;
var me=this;
var ws = new WebSocket("ws://127.0.0.1:3564");
ws.binaryType = "arraybuffer" ;
@@ -119,7 +120,7 @@ cc.Class({
var table_data = this.hand_data;
table_data['table_name']=table_data['table_name']?table_data['table_name']:"";
table_data['table_code']=table_data['table_code']?table_data['table_code']:"";
var node_table_bg = cc.find("Canvas/table_bg");
var node_table_bg = cc.find("Canvas");
//异步加载头像,不能放在循环内
var load_avatar = function(url,sprite_user){
@@ -206,7 +207,8 @@ cc.Class({
//监听座位点击事件
onSeat:function(){
cc.log("onSeat init");
var node_table_bg = cc.find("Canvas/table_bg");
var node_table_bg = cc.find("Canvas");
cc.log(node_table_bg);
for(var i=0;i<9;i++){
//var v = table_data['players'][k];
var seat_node = node_table_bg.getChildByName("seat_"+i);
@@ -252,7 +254,7 @@ cc.Class({
var seatName = e.currentTarget._name;
var node_table_bg = cc.find("Canvas/table_bg");
var node_table_bg = cc.find("Canvas");
var seat_node = node_table_bg.getChildByName(seatName);
var node_size = seat_node.getContentSize();//获取node的尺寸
//名字
@@ -389,12 +391,12 @@ cc.Class({
//ReplaceSeat:function(){
// if(this.Lang == 'thai-th'){
// for(var i=0;i<9;i++){
// cc.find("Canvas/table_bg/seat_"+i).getComponent(cc.Sprite).setVisible(false);
// cc.find("Canvas/seat_"+i).getComponent(cc.Sprite).setVisible(false);
// }
// cc.loader.loadRes("GameMain_th_6p",cc.SpriteAtlas,function(err,atlas){
// var game_seat_empty = atlas.getSpriteFrame("game_seat_empty");
// for(var i=0;i<9;i++){
// var sprite = cc.find("Canvas/table_bg/seat_"+i).getComponent(cc.Sprite)
// var sprite = cc.find("Canvas/seat_"+i).getComponent(cc.Sprite)
// sprite.spriteFrame = game_seat_empty;
// sprite.setVisible(true);
// }

View File

@@ -1,6 +1,9 @@
{
"ver": "1.0.2",
"ver": "1.0.5",
"uuid": "b91d4d1c-d6e8-4abe-8ab4-226f9e1dce57",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -40,7 +40,7 @@ cc.Class({
long_time = me.fixedThinkTime;
}
}
var node_table_bg = cc.find("Canvas/table_bg");
var node_table_bg = cc.find("Canvas");
//初始化
this.countdown_repeat_num = 0;
this.countdown_long_time = 0;
@@ -137,7 +137,7 @@ cc.Class({
this.countdown_node.destroy();//删除该节点
}
//延时
var node_table_bg = cc.find("Canvas/table_bg");
var node_table_bg = cc.find("Canvas");
var seat = node_table_bg.getChildByName("seat_"+seat_number);//获取该作为的节点
//倒计时遮罩层
var node = new cc.Node();

View File

@@ -1,6 +1,9 @@
{
"ver": "1.0.2",
"ver": "1.0.5",
"uuid": "ac50a2dc-5c7b-450e-8387-93e1500ca396",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -1,6 +1,9 @@
{
"ver": "1.0.2",
"ver": "1.0.5",
"uuid": "2d3ef493-9e65-47f1-a3cc-c30517fcd563",
"isPlugin": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -69,12 +69,13 @@ cc.Class({
me.is_mobile = this.isMobile();
if(me.is_mobile == 0){
var canvas = cc.find("Canvas");
canvas.width = 418;
canvas.height = 738;
//canvas.width = 418;
//canvas.height = 738;
}
cc.game.config.showFPS=false;
cc.director.setDisplayStats(false);
//cc.director.setDisplayStats(false);
this.eventListen();
@@ -283,9 +284,9 @@ cc.Class({
//初始化小盲位,大盲位
initsb:function(){
var table_data = this.hand_data;
var node_table_bg = cc.find("Canvas/table_bg");
var node_table_bg = cc.find("Canvas");
//dealer位
var dealer_node = cc.find("Canvas/table_bg/seat_"+table_data['start']['d_chair']+"/dealer");
var dealer_node = cc.find("Canvas/seat_"+table_data['start']['d_chair']+"/dealer");
var dealer_sprite = dealer_node.getComponent(cc.Sprite);
if(dealer_sprite == null){
var dealer_sprite = dealer_node.addComponent(cc.Sprite);
@@ -328,7 +329,7 @@ cc.Class({
//发牌
for(var k in hand_data['players']){
var v = hand_data['players'][k];
var seat_node = cc.find("Canvas/table_bg").getChildByName("seat_"+v['chair_id']);
var seat_node = cc.find("Canvas").getChildByName("seat_"+v['chair_id']);
var node_hand_card = new cc.Node();
var sprite_hand_card = node_hand_card.addComponent(cc.Sprite);
node_hand_card.scale = 1;
@@ -415,7 +416,7 @@ cc.Class({
},
//显示操作提示
game_tip:function(sit,url,clean){
var game_tip=this.node.parent.getChildByName("table_bg").getChildByName("seat_"+sit).getChildByName("game_tip");
var game_tip=this.node.parent.getChildByName("Canvas").getChildByName("seat_"+sit).getChildByName("game_tip");
//var pos=table_bg.getChildByName("seat_"+sit).getPosition();//获取坐标
var sp=game_tip.getComponent(cc.Sprite);
if(cc.isValid(sp)){
@@ -515,7 +516,7 @@ cc.Class({
this.add_countdown(sit,duration);
var finished=function(){
var seat_node = cc.find("Canvas/table_bg/seat_"+sit+"/chips");
var seat_node = cc.find("Canvas/seat_"+sit+"/chips");
var seat_lable = seat_node.getComponent(cc.Label);
var seat_chips = parseInt(seat_lable.string);
if(seat_chips <= handChips){
@@ -535,7 +536,7 @@ cc.Class({
this.add_countdown(sit,duration);
var finished=function(){
var seat_node = cc.find("Canvas/table_bg/seat_"+sit+"/chips");
var seat_node = cc.find("Canvas/seat_"+sit+"/chips");
var seat_lable = seat_node.getComponent(cc.Label);
var seat_chips = parseInt(seat_lable.string);
if(seat_chips <= handChips){
@@ -666,7 +667,7 @@ cc.Class({
},
//比牌结束显示输赢详情
endtip:function(sit,chips,card1,card2,cardType,new_chips) {
var table_bg = this.node.parent.getChildByName("table_bg");
var table_bg = this.node.parent.getChildByName("Canvas");
var pos = table_bg.getChildByName("seat_" + sit).getPosition();
var node = new cc.Node();
@@ -687,7 +688,7 @@ cc.Class({
ctNode.setPosition(0, -80);
//显示当前的筹码数
var seat_chips_node = cc.find("Canvas/table_bg/seat_"+sit+"/chips");
var seat_chips_node = cc.find("Canvas/seat_"+sit+"/chips");
var seat_chips_lable = seat_chips_node.getComponent(cc.Label);
seat_chips_lable.string = new_chips;
if (chips > 0) {
@@ -813,7 +814,7 @@ cc.Class({
this.table_tips=[];
}
//清理dealer
var dealer_node = cc.find("Canvas/table_bg/seat_"+this.hand_data['start']['d_chair']+"/dealer");
var dealer_node = cc.find("Canvas/seat_"+this.hand_data['start']['d_chair']+"/dealer");
if(dealer_node.getComponent(cc.Sprite) != null){
dealer_node.getComponent(cc.Sprite).setVisible(false);
//dealer_node.getComponent(cc.Sprite).destroy();
@@ -831,7 +832,7 @@ cc.Class({
me.countdown_over_task=null;
var finished = function(){
var table_bg = cc.find("Canvas/table_bg");
var table_bg = cc.find("Canvas");
var seat=table_bg.getChildByName("seat_"+sit);
//seat.enabled=false;
//隐藏图像
@@ -923,7 +924,7 @@ cc.Class({
pot=Number(pot);
inpot=Number(inpot);
//var chips="game_chip_tip";
var table_bg=this.node.parent.getChildByName("table_bg");
var table_bg=this.node.parent.getChildByName("Canvas");
var chipNode=table_bg.getChildByName("chip_"+sit);
var chipSp=chipNode.getComponent(cc.Sprite);
@@ -943,7 +944,7 @@ cc.Class({
var showLabel=function(node){
var node_name = node.name;//找到这个节点
var node = cc.find("Canvas/table_bg/"+node_name);//用这个方法找到节点,重新赋值,否则无法找到该节点的子节点
var node = cc.find("Canvas/"+node_name);//用这个方法找到节点,重新赋值,否则无法找到该节点的子节点
var table_chips_node = node.getChildByName("table_chip");
if(table_chips_node == null){
var cn = new cc.Node();
@@ -1310,7 +1311,7 @@ cc.Class({
//别人正在操作时,站起
other_quit:function(sit){
var finished = function(){
var table_bg = cc.find("Canvas/table_bg");
var table_bg = cc.find("Canvas");
var seat=table_bg.getChildByName("seat_"+sit);
//seat.enabled=false;
//隐藏图像

View File

@@ -1,6 +1,9 @@
{
"ver": "1.0.2",
"ver": "1.0.5",
"uuid": "ba49ca20-5856-400d-8933-bc1dfd520dc1",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -1,9 +1,10 @@
{
"ver": "1.0.0",
"ver": "2.2.0",
"uuid": "9645f4c7-099e-4bac-9779-ac372a798d1b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"GameMain_6p": {
"ver": "1.0.3",

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "0dd8cf6f-e146-4622-8b8e-7c9dc5f77a48",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "ae2e6fb2-2be9-4ced-a4e9-2ee56c9667ed",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "97c76f08-6b20-4757-aefb-5a95e710cb13",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "2773b2b7-4482-4133-9900-7fdcd308d2f9",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "0b5c008e-cf15-4b8c-be63-8b1197cb1789",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "87dcf996-d47c-4b0e-a821-a1d034aad12b",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "e32b382b-4248-4a95-9c83-6e170adb4aa4",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "b3e3bc15-0e5e-4d16-932c-08651a89045d",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "3ef5c879-e7cd-4121-be05-a98fa397e548",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,5 +1,6 @@
{
"ver": "1.0.0",
"ver": "2.0.0",
"uuid": "85960017-45b4-40f2-a17e-75cdfda31054",
"downloadMode": 0,
"subMetas": {}
}

View File

@@ -1,9 +1,10 @@
{
"ver": "1.0.0",
"ver": "2.2.0",
"uuid": "24e07000-e189-4c09-8859-47cc25581533",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"game_cards": {
"ver": "1.0.3",
@@ -13,11 +14,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": -16.5,
"offsetY": 7.5,
"offsetY": 7,
"trimX": 2,
"trimY": 2,
"width": 987,
"height": 1005,
"height": 1006,
"rawWidth": 1024,
"rawHeight": 1024,
"borderTop": 0,

View File

@@ -1,9 +1,10 @@
{
"ver": "1.0.0",
"ver": "2.2.0",
"uuid": "d3175df2-92cf-41d8-9e71-1fd53833ccb5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"game_cards_6p": {
"ver": "1.0.3",
@@ -13,11 +14,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": -21,
"offsetY": 1.5,
"offsetY": 1,
"trimX": 2,
"trimY": 2,
"width": 978,
"height": 2041,
"height": 2042,
"rawWidth": 1024,
"rawHeight": 2048,
"borderTop": 0,

View File

@@ -1,9 +1,10 @@
{
"ver": "1.0.0",
"ver": "2.2.0",
"uuid": "e1084d70-0b00-4041-8ccc-62b69fbf1716",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"game_desk_bg": {
"ver": "1.0.3",

View File

@@ -1,9 +1,10 @@
{
"ver": "1.0.0",
"ver": "2.2.0",
"uuid": "8eb63dd6-6d9b-47d8-8021-077beaf0c174",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"game_desk_bg_6p": {
"ver": "1.0.3",

View File

@@ -1,9 +1,10 @@
{
"ver": "1.0.0",
"ver": "2.2.0",
"uuid": "ac7ab283-08d2-456d-b2fc-0a9ffe60330e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"splash": {
"ver": "1.0.3",

View File

@@ -8,5 +8,32 @@
"default"
],
"start-scene": "b1a3242c-6595-42df-a0fc-e177f727763d",
"excluded-modules": []
"excluded-modules": [],
"last-module-event-record-time": 0,
"design-resolution-width": 960,
"design-resolution-height": 640,
"fit-width": false,
"fit-height": true,
"use-project-simulator-setting": false,
"simulator-orientation": false,
"use-customize-simulator": false,
"simulator-resolution": {
"width": 960,
"height": 640
},
"cocos-analytics": {
"enable": false,
"appID": "13798",
"appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2"
},
"facebook": {
"enable": false,
"appID": "",
"live": {
"enable": false
},
"audience": {
"enable": false
}
}
}