1、胡牌动作
2、胡牌的业务逻辑
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -153,6 +153,22 @@ cc.Class({
|
||||
inviteplayer:{
|
||||
default:null ,
|
||||
type : cc.Prefab
|
||||
},
|
||||
hu_cards_current:{
|
||||
default:null ,
|
||||
type : cc.Node
|
||||
},
|
||||
hu_cards_top:{
|
||||
default:null ,
|
||||
type : cc.Node
|
||||
},
|
||||
hu_cards_left:{
|
||||
default:null ,
|
||||
type : cc.Node
|
||||
},
|
||||
hu_cards_right:{
|
||||
default:null ,
|
||||
type : cc.Node
|
||||
}
|
||||
},
|
||||
|
||||
@@ -860,7 +876,6 @@ cc.Class({
|
||||
/**
|
||||
* 杠后移除当前手牌,进入到 杠 列表里
|
||||
*/
|
||||
|
||||
for(var inx = 0 ; inx < context.playercards.length ; ){
|
||||
let temp = context.playercards[inx].getComponent("HandCards");
|
||||
if(data.cardtype == temp.mjtype && data.cardvalue == temp.mjvalue){
|
||||
@@ -870,7 +885,16 @@ cc.Class({
|
||||
inx++ ;
|
||||
}
|
||||
}
|
||||
if(data.action == "hu") {
|
||||
//胡牌了,把胡的牌放入到胡牌列表里,然后 , 把当前的玩家的牌局置为不可点击
|
||||
let hu_card = cc.instantiate(context.takecards_one);
|
||||
let temp = hu_card.getComponent("DeskCards");
|
||||
temp.init(data.card);
|
||||
|
||||
context.deskcards.push(hu_card);
|
||||
hu_card.setScale (0.8 , 0.8) ;
|
||||
hu_card.parent = context.hu_cards_current;
|
||||
}else{
|
||||
let cards_gang;
|
||||
|
||||
/**
|
||||
@@ -915,6 +939,7 @@ cc.Class({
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
context.exchange_state("nextplayer" , context);
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ var HTTP = cc.Class({
|
||||
// ...
|
||||
},
|
||||
statics: {
|
||||
baseURL:"http://192.168.1.155",
|
||||
wsURL : "http://192.168.1.155:9081",
|
||||
baseURL:"http://127.0.0.1",
|
||||
wsURL : "http://127.0.0.1:9081",
|
||||
authorization: null,
|
||||
httpGet: function (url , success , error , object) {
|
||||
var xhr = cc.loader.getXMLHttpRequest();
|
||||
|
||||
Reference in New Issue
Block a user