-
Notifications
You must be signed in to change notification settings - Fork 0
/
choose.js
45 lines (45 loc) · 998 Bytes
/
choose.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(function(){
ChooseLayer = cc.Layer.extend({
jsBind:{
back:
{
_layout:[[1,1],[0.5,0.5],[0,0],2],
close:{
_click:function(btn,evt)
{
jsclient.chooseui.removeFromParent(true);
}
},
selectBg:{
_run:function(){ selectBg=this; },
ddzSelect:{
_click:function(btn,evt)
{
jsclient.chooseui.removeFromParent(true);
sendEvent("joinRoom");
cc.log("ddz=============");
jsclient.gameid = "ddz";
}
},
scmjSelect:{
_click:function(btn,evt)
{
jsclient.chooseui.removeFromParent(true);
sendEvent("joinRoom");
cc.log("scmj=============");
jsclient.gameid = "hanmj";
}
}
}
}
},
ctor:function () {
this._super();
var chooseui = ccs.load("res/choose.json");
ConnectUI2Logic(chooseui.node,this.jsBind);
this.addChild(chooseui.node);
jsclient.chooseui=this;
return true;
}
});
})();