|
@@ -4,11 +4,11 @@ cc.Class({
|
|
|
properties: {
|
|
properties: {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- ctor :function () {
|
|
|
|
|
|
|
+ ctor: function () {
|
|
|
this.mGameServerItem = null;
|
|
this.mGameServerItem = null;
|
|
|
this.mShowReLink = false;
|
|
this.mShowReLink = false;
|
|
|
},
|
|
},
|
|
|
- onLoad:function () {
|
|
|
|
|
|
|
+ onLoad: function () {
|
|
|
cc.debug.setDisplayStats(false);
|
|
cc.debug.setDisplayStats(false);
|
|
|
FitSize(this.node);
|
|
FitSize(this.node);
|
|
|
ShowO2I(this.node, 0.5);
|
|
ShowO2I(this.node, 0.5);
|
|
@@ -17,10 +17,10 @@ cc.Class({
|
|
|
this.m_BGSprite = this.m_gameNode.getComponent(cc.Sprite);
|
|
this.m_BGSprite = this.m_gameNode.getComponent(cc.Sprite);
|
|
|
this.m_bTipGPS = true;
|
|
this.m_bTipGPS = true;
|
|
|
window.g_CntGameGPS = 0;
|
|
window.g_CntGameGPS = 0;
|
|
|
- this.schedule(this.NetworkHeartbeat, 5);
|
|
|
|
|
|
|
+ this.schedule(this.NetworkHeartbeat, 5);
|
|
|
this.$('BtInvite').active = false;
|
|
this.$('BtInvite').active = false;
|
|
|
this.m_Loading = this.$('loading');
|
|
this.m_Loading = this.$('loading');
|
|
|
- if(window.gGameBG == null) window.gGameBG = 'loading';
|
|
|
|
|
|
|
+ if (window.gGameBG == null) window.gGameBG = 'loading';
|
|
|
|
|
|
|
|
// var bg = this.$('loading/logo@Sprite');
|
|
// var bg = this.$('loading/logo@Sprite');
|
|
|
// if (window.WPMJ==0){
|
|
// if (window.WPMJ==0){
|
|
@@ -32,89 +32,89 @@ cc.Class({
|
|
|
// bg.spriteFrame = spriteFrame;
|
|
// bg.spriteFrame = spriteFrame;
|
|
|
// });
|
|
// });
|
|
|
// }
|
|
// }
|
|
|
-
|
|
|
|
|
- if (window.WPMJ==0){
|
|
|
|
|
- this.$('loading/Logowp').active = true;
|
|
|
|
|
- this.$('loading/Logommh').active = false;
|
|
|
|
|
- }else{
|
|
|
|
|
- this.$('loading/Logowp').active = false;
|
|
|
|
|
- this.$('loading/Logommh').active = true;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (window.WPMJ == 0) {
|
|
|
|
|
+ this.$('loading/Logowp').active = true;
|
|
|
|
|
+ this.$('loading/Logommh').active = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$('loading/Logowp').active = false;
|
|
|
|
|
+ this.$('loading/Logommh').active = true;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- update :function (dt) {
|
|
|
|
|
- if(window.gGameBG == 'loading') {
|
|
|
|
|
|
|
+ update: function (dt) {
|
|
|
|
|
+ if (window.gGameBG == 'loading') {
|
|
|
|
|
|
|
|
- window.gGameBG = cc.gPreLoader.LoadRes(`${GameDef.BGPath}`, '' + GameDef.KIND_ID, function(res) {
|
|
|
|
|
|
|
+ window.gGameBG = cc.gPreLoader.LoadRes(`${GameDef.BGPath}`, '' + GameDef.KIND_ID, function (res) {
|
|
|
this.m_BGSprite.spriteFrame = res;
|
|
this.m_BGSprite.spriteFrame = res;
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
|
|
|
|
|
|
- } else if(window.gGameBG instanceof cc.SpriteFrame) {
|
|
|
|
|
|
|
+ } else if (window.gGameBG instanceof cc.SpriteFrame) {
|
|
|
this.m_BGSprite.spriteFrame = window.gGameBG;
|
|
this.m_BGSprite.spriteFrame = window.gGameBG;
|
|
|
window.gGameBG = null;
|
|
window.gGameBG = null;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// use this for initialization
|
|
// use this for initialization
|
|
|
- start :function () {
|
|
|
|
|
|
|
+ start: function () {
|
|
|
g_Launch = null;
|
|
g_Launch = null;
|
|
|
g_Login = null;
|
|
g_Login = null;
|
|
|
g_Lobby = null;
|
|
g_Lobby = null;
|
|
|
g_Table = this;
|
|
g_Table = this;
|
|
|
g_CurScene = this;
|
|
g_CurScene = this;
|
|
|
this.mGameServerItem = g_ServerListDataLast;
|
|
this.mGameServerItem = g_ServerListDataLast;
|
|
|
- console.log("房间列表:",this.mGameServerItem)
|
|
|
|
|
|
|
+ console.log("房间列表:", this.mGameServerItem)
|
|
|
this.m_ServerItem = this.node.getComponent("CServerItem")
|
|
this.m_ServerItem = this.node.getComponent("CServerItem")
|
|
|
- if(this.m_ServerItem == null) this.m_ServerItem = this.node.addComponent("CServerItem");
|
|
|
|
|
|
|
+ if (this.m_ServerItem == null) this.m_ServerItem = this.node.addComponent("CServerItem");
|
|
|
var TableViewNode = new cc.Node('TableViewFrame');
|
|
var TableViewNode = new cc.Node('TableViewFrame');
|
|
|
this.node.addChild(TableViewNode);
|
|
this.node.addChild(TableViewNode);
|
|
|
this.m_TableViewFrame = TableViewNode.addComponent("TableViewFrame");
|
|
this.m_TableViewFrame = TableViewNode.addComponent("TableViewFrame");
|
|
|
this.m_ServerItem.SetServerItemSink(this);
|
|
this.m_ServerItem.SetServerItemSink(this);
|
|
|
this.m_ServerItem.SetStringMessageSink(this);
|
|
this.m_ServerItem.SetStringMessageSink(this);
|
|
|
this.m_ServerItem.mTableViewFrame = this.m_TableViewFrame;
|
|
this.m_ServerItem.mTableViewFrame = this.m_TableViewFrame;
|
|
|
- this.m_TableViewFrame.SetServerItem( this.m_ServerItem );
|
|
|
|
|
|
|
+ this.m_TableViewFrame.SetServerItem(this.m_ServerItem);
|
|
|
|
|
|
|
|
this.CreateKernel();
|
|
this.CreateKernel();
|
|
|
- window.isJoinGame = false;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ window.isJoinGame = false;
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- InsertPromptString:function (pszString, iButtonType) {
|
|
|
|
|
|
|
+ InsertPromptString: function (pszString, iButtonType) {
|
|
|
//提示信息
|
|
//提示信息
|
|
|
this.ShowAlert(pszString);
|
|
this.ShowAlert(pszString);
|
|
|
},
|
|
},
|
|
|
- OnAlertExitLogin:function(Res){
|
|
|
|
|
- if(Res) this.ExitGameLogin();
|
|
|
|
|
|
|
+ OnAlertExitLogin: function (Res) {
|
|
|
|
|
+ if (Res) this.ExitGameLogin();
|
|
|
},
|
|
},
|
|
|
- InsertSystemString:function (pszString, iButtonType) {
|
|
|
|
|
|
|
+ InsertSystemString: function (pszString, iButtonType) {
|
|
|
},
|
|
},
|
|
|
- InsertPromptStringAndClose:function (pszString, iButtonType) {
|
|
|
|
|
|
|
+ InsertPromptStringAndClose: function (pszString, iButtonType) {
|
|
|
//提示信息
|
|
//提示信息
|
|
|
- this.ShowAlert(pszString,Alert_Yes,"OnAlertExitLogin",this);
|
|
|
|
|
|
|
+ this.ShowAlert(pszString, Alert_Yes, "OnAlertExitLogin", this);
|
|
|
},
|
|
},
|
|
|
//登陆完成
|
|
//登陆完成
|
|
|
- OnGRLogonFinish :function() {
|
|
|
|
|
|
|
+ OnGRLogonFinish: function () {
|
|
|
var pMySelfUserItem = this.m_ServerItem.GetMeUserItem();
|
|
var pMySelfUserItem = this.m_ServerItem.GetMeUserItem();
|
|
|
- if(pMySelfUserItem.GetTableID()==INVALID_CHAIR){
|
|
|
|
|
- if(g_ServerListDataLast.wServerType & (GAME_GENRE_PERSONAL|GAME_GENRE_PERSONAL_S|GAME_GENRE_PERSONAL_G)){
|
|
|
|
|
|
|
+ if (pMySelfUserItem.GetTableID() == INVALID_CHAIR) {
|
|
|
|
|
+ if (g_ServerListDataLast.wServerType & (GAME_GENRE_PERSONAL | GAME_GENRE_PERSONAL_S | GAME_GENRE_PERSONAL_G)) {
|
|
|
this.m_ServerItem.PerformEnterRoom();
|
|
this.m_ServerItem.PerformEnterRoom();
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.m_ServerItem.PerformSitDownAction(this.mGameServerItem.wTableID, INVALID_CHAIR, false);
|
|
this.m_ServerItem.PerformSitDownAction(this.mGameServerItem.wTableID, INVALID_CHAIR, false);
|
|
|
}
|
|
}
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.m_ServerItem.OnGFGameReady();
|
|
this.m_ServerItem.OnGFGameReady();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//比赛消息
|
|
//比赛消息
|
|
|
- InsertMatchJoinString:function (lMatchFee){
|
|
|
|
|
|
|
+ InsertMatchJoinString: function (lMatchFee) {
|
|
|
this.m_lMatchFee = lMatchFee;
|
|
this.m_lMatchFee = lMatchFee;
|
|
|
- if(confirm("參賽將扣除報名費 "+this.m_lMatchFee.toString()+" 遊戲幣,確認要參賽嗎?")){
|
|
|
|
|
|
|
+ if (confirm("參賽將扣除報名費 " + this.m_lMatchFee.toString() + " 遊戲幣,確認要參賽嗎?")) {
|
|
|
this.OnJionCallBack();
|
|
this.OnJionCallBack();
|
|
|
}
|
|
}
|
|
|
return true;
|
|
return true;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- OnJionCallBack :function() {
|
|
|
|
|
|
|
+ OnJionCallBack: function () {
|
|
|
pServerItem = IServerItem.get();
|
|
pServerItem = IServerItem.get();
|
|
|
var cbData = new Uint8Array(8);
|
|
var cbData = new Uint8Array(8);
|
|
|
gCByte.w8(cbData, 0, this.m_lMatchFee);
|
|
gCByte.w8(cbData, 0, this.m_lMatchFee);
|
|
@@ -122,21 +122,21 @@ cc.Class({
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//请求失败
|
|
//请求失败
|
|
|
- onGRRequestFailure :function(szDescribeString){
|
|
|
|
|
- this.ShowAlert(szDescribeString,Alert_Yes,"OnAlertExitGame",this);
|
|
|
|
|
|
|
+ onGRRequestFailure: function (szDescribeString) {
|
|
|
|
|
+ this.ShowAlert(szDescribeString, Alert_Yes, "OnAlertExitGame", this);
|
|
|
},
|
|
},
|
|
|
- OnAlertExitGame:function(Res){
|
|
|
|
|
- if(Res) this.ExitGame();
|
|
|
|
|
|
|
+ OnAlertExitGame: function (Res) {
|
|
|
|
|
+ if (Res) this.ExitGame();
|
|
|
},
|
|
},
|
|
|
//创建游戏内核
|
|
//创建游戏内核
|
|
|
- CreateKernel :function() {
|
|
|
|
|
|
|
+ CreateKernel: function () {
|
|
|
var kernel = gClientKernel.create();
|
|
var kernel = gClientKernel.create();
|
|
|
if (kernel == null) return false;
|
|
if (kernel == null) return false;
|
|
|
kernel.SetServerItem(this.m_ServerItem);
|
|
kernel.SetServerItem(this.m_ServerItem);
|
|
|
kernel.SetStringMessageSink(this);
|
|
kernel.SetStringMessageSink(this);
|
|
|
- kernel.mIClientKernelSink=null;
|
|
|
|
|
|
|
+ kernel.mIClientKernelSink = null;
|
|
|
this.InitGameLayer();
|
|
this.InitGameLayer();
|
|
|
- // this.schedule(this.InitGameLayer, 0.05);
|
|
|
|
|
|
|
+ // this.schedule(this.InitGameLayer, 0.05);
|
|
|
|
|
|
|
|
if (kernel.Init()) return true;
|
|
if (kernel.Init()) return true;
|
|
|
|
|
|
|
@@ -145,128 +145,127 @@ cc.Class({
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//创建游戏
|
|
//创建游戏
|
|
|
- InitGameLayer:function (){
|
|
|
|
|
|
|
+ InitGameLayer: function () {
|
|
|
var kernel = gClientKernel.get();
|
|
var kernel = gClientKernel.get();
|
|
|
- if(kernel.mIClientKernelSink) return
|
|
|
|
|
|
|
+ if (kernel.mIClientKernelSink) return
|
|
|
|
|
|
|
|
- this.ShowGamePrefab("GameClientEngine", GameDef.KIND_ID, this.m_gameNode, function(Js){
|
|
|
|
|
|
|
+ this.ShowGamePrefab("GameClientEngine", GameDef.KIND_ID, this.m_gameNode, function (Js) {
|
|
|
this.m_GameEngine = Js;
|
|
this.m_GameEngine = Js;
|
|
|
Js.SetTableScene(this);
|
|
Js.SetTableScene(this);
|
|
|
kernel.SetClientKernelSink(Js);
|
|
kernel.SetClientKernelSink(Js);
|
|
|
- if(Js.LoadSound) Js.LoadSound();
|
|
|
|
|
|
|
+ if (Js.LoadSound) Js.LoadSound();
|
|
|
this.m_ServerItem.ConnectServer(this.mGameServerItem, 0, 0);
|
|
this.m_ServerItem.ConnectServer(this.mGameServerItem, 0, 0);
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//用户更新
|
|
//用户更新
|
|
|
- OnGRUserUpdate :function(pIClientUserItem)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ OnGRUserUpdate: function (pIClientUserItem) {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- LoadingOver:function(){
|
|
|
|
|
- if(this.m_ReLinkTime != null){
|
|
|
|
|
|
|
+ LoadingOver: function () {
|
|
|
|
|
+ if (this.m_ReLinkTime != null) {
|
|
|
this.OnGFServerReLink();
|
|
this.OnGFServerReLink();
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.StopLoading();
|
|
this.StopLoading();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//房间退出
|
|
//房间退出
|
|
|
- OnGFServerClose :function(szMessage){
|
|
|
|
|
- this.ShowAlert("您掉線了! 請檢查網路設備連接狀態! 點擊確定後將返回遊戲大廳.",Alert_Yes,"OnAlertExitGame",this);
|
|
|
|
|
|
|
+ OnGFServerClose: function (szMessage) {
|
|
|
|
|
+ this.ShowAlert("您掉線了! 請檢查網路設備連接狀態! 點擊確定後將返回遊戲大廳.", Alert_Yes, "OnAlertExitGame", this);
|
|
|
},
|
|
},
|
|
|
- OnGFServerReLink :function(){
|
|
|
|
|
- if(this.m_ServerItem.mInterval != null || this.mShowReLink) return this.StopLoading();
|
|
|
|
|
- if(window.ReLinkTime == null) window.ReLinkTime = 0;
|
|
|
|
|
|
|
+ OnGFServerReLink: function () {
|
|
|
|
|
+ if (this.m_ServerItem.mInterval != null || this.mShowReLink) return this.StopLoading();
|
|
|
|
|
+ if (window.ReLinkTime == null) window.ReLinkTime = 0;
|
|
|
window.ReLinkTime++;
|
|
window.ReLinkTime++;
|
|
|
this.StopLoading();
|
|
this.StopLoading();
|
|
|
- if(window.ReLinkTime%7 >= 6){
|
|
|
|
|
|
|
+ if (window.ReLinkTime % 7 >= 6) {
|
|
|
this.mShowReLink = true;
|
|
this.mShowReLink = true;
|
|
|
- this.ShowAlert('網路异常,是否嘗試重連?',Alert_YesNo,function(Res){
|
|
|
|
|
|
|
+ this.ShowAlert('網路异常,是否嘗試重連?', Alert_YesNo, function (Res) {
|
|
|
this.mShowReLink = false;
|
|
this.mShowReLink = false;
|
|
|
- if(Res){
|
|
|
|
|
|
|
+ if (Res) {
|
|
|
this.ShowLoading();
|
|
this.ShowLoading();
|
|
|
this.m_ServerItem.CloseSocket();
|
|
this.m_ServerItem.CloseSocket();
|
|
|
this.m_ServerItem.ConnectServer(this.mGameServerItem, 0, 0);
|
|
this.m_ServerItem.ConnectServer(this.mGameServerItem, 0, 0);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.OnGFServerClose();
|
|
this.OnGFServerClose();
|
|
|
}
|
|
}
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.ShowLoading();
|
|
this.ShowLoading();
|
|
|
this.m_ServerItem.CloseSocket();
|
|
this.m_ServerItem.CloseSocket();
|
|
|
this.m_ServerItem.ConnectServer(this.mGameServerItem, 0, 0);
|
|
this.m_ServerItem.ConnectServer(this.mGameServerItem, 0, 0);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- ExitGame :function(){
|
|
|
|
|
- if(this.m_TableViewFrame){
|
|
|
|
|
|
|
+ ExitGame: function () {
|
|
|
|
|
+ if (this.m_TableViewFrame) {
|
|
|
//退出游戏
|
|
//退出游戏
|
|
|
this.m_TableViewFrame.ExitGame();
|
|
this.m_TableViewFrame.ExitGame();
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
gClientKernel.destory();
|
|
gClientKernel.destory();
|
|
|
ChangeScene('Lobby');
|
|
ChangeScene('Lobby');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- ExitGameLogin :function() {
|
|
|
|
|
|
|
+ ExitGameLogin: function () {
|
|
|
//退出游戏
|
|
//退出游戏
|
|
|
this.m_TableViewFrame.ExitGame();
|
|
this.m_TableViewFrame.ExitGame();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
//网络心跳
|
|
//网络心跳
|
|
|
- NetworkHeartbeat :function(dt) {
|
|
|
|
|
- if(this.m_ServerItem.mServiceStatus != ServiceStatus_ServiceIng) return
|
|
|
|
|
- if (this.m_ServerItem != null && this.m_ServerItem.mInterval == null){
|
|
|
|
|
|
|
+ NetworkHeartbeat: function (dt) {
|
|
|
|
|
+ if (this.m_ServerItem.mServiceStatus != ServiceStatus_ServiceIng) return
|
|
|
|
|
+ if (this.m_ServerItem != null && this.m_ServerItem.mInterval == null) {
|
|
|
this.m_ServerItem.mHeartStatTime = new Date().getTime(); //服务器心跳时间
|
|
this.m_ServerItem.mHeartStatTime = new Date().getTime(); //服务器心跳时间
|
|
|
this.m_ServerItem.SendSocketClass(MDM_KN_COMMAND, SUB_KN_CLIENT_HEART);
|
|
this.m_ServerItem.SendSocketClass(MDM_KN_COMMAND, SUB_KN_CLIENT_HEART);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- UpdateGPS:function(para) {
|
|
|
|
|
- var GameClientEngine = this['m_JsGameClientEngine_'+GameDef.KIND_ID]
|
|
|
|
|
- if(GameClientEngine)GameClientEngine.UpdateGPS(para);
|
|
|
|
|
|
|
+ UpdateGPS: function (para) {
|
|
|
|
|
+ var GameClientEngine = this['m_JsGameClientEngine_' + GameDef.KIND_ID]
|
|
|
|
|
+ if (GameClientEngine) GameClientEngine.UpdateGPS(para);
|
|
|
},
|
|
},
|
|
|
- UpdateSet:function() {
|
|
|
|
|
- var GameClientEngine = this['m_JsGameClientEngine_'+GameDef.KIND_ID]
|
|
|
|
|
- if(GameClientEngine)GameClientEngine.m_GameClientView.UpdateSet();
|
|
|
|
|
|
|
+ UpdateSet: function () {
|
|
|
|
|
+ var GameClientEngine = this['m_JsGameClientEngine_' + GameDef.KIND_ID]
|
|
|
|
|
+ if (GameClientEngine) GameClientEngine.m_GameClientView.UpdateSet();
|
|
|
},
|
|
},
|
|
|
-/////////////////////////////////////////////////////////////////////////////语音接口
|
|
|
|
|
- GetVoiceCtrl:function(para) {
|
|
|
|
|
- var GameClientEngine = this['m_JsGameClientEngine_'+GameDef.KIND_ID];
|
|
|
|
|
- if(GameClientEngine == null) return null;
|
|
|
|
|
|
|
+ /////////////////////////////////////////////////////////////////////////////语音接口
|
|
|
|
|
+ GetVoiceCtrl: function (para) {
|
|
|
|
|
+ var GameClientEngine = this['m_JsGameClientEngine_' + GameDef.KIND_ID];
|
|
|
|
|
+ if (GameClientEngine == null) return null;
|
|
|
return GameClientEngine.GetVoiceCtrl();
|
|
return GameClientEngine.GetVoiceCtrl();
|
|
|
},
|
|
},
|
|
|
//上传完成
|
|
//上传完成
|
|
|
- OnVoiceUpLoad:function(para) {
|
|
|
|
|
|
|
+ OnVoiceUpLoad: function (para) {
|
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
|
- if(VoiceCtrl)VoiceCtrl.OnRecordOver(para);
|
|
|
|
|
|
|
+ if (VoiceCtrl) VoiceCtrl.OnRecordOver(para);
|
|
|
},
|
|
},
|
|
|
- OnVoiceLoad:function(para) {
|
|
|
|
|
|
|
+ OnVoiceLoad: function (para) {
|
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
|
- if(VoiceCtrl)VoiceCtrl.OnLoadVoice(para);
|
|
|
|
|
|
|
+ if (VoiceCtrl) VoiceCtrl.OnLoadVoice(para);
|
|
|
},
|
|
},
|
|
|
//播放完成
|
|
//播放完成
|
|
|
- OnPlayFinish:function() {
|
|
|
|
|
|
|
+ OnPlayFinish: function () {
|
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
|
- if(VoiceCtrl)VoiceCtrl.OnPlayFinish();
|
|
|
|
|
|
|
+ if (VoiceCtrl) VoiceCtrl.OnPlayFinish();
|
|
|
},
|
|
},
|
|
|
- onRecordFinish :function (str) {
|
|
|
|
|
|
|
+ onRecordFinish: function (str) {
|
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
var VoiceCtrl = this.GetVoiceCtrl();
|
|
|
- if(VoiceCtrl)VoiceCtrl.onRecordFinish(str);
|
|
|
|
|
|
|
+ if (VoiceCtrl) VoiceCtrl.onRecordFinish(str);
|
|
|
},
|
|
},
|
|
|
- OnBtClick_Invite:function(){
|
|
|
|
|
- var GameClientEngine = this['m_JsGameClientEngine_'+GameDef.KIND_ID]
|
|
|
|
|
- if(GameClientEngine){
|
|
|
|
|
- this.ShowPrefabDLG('ClubInviteUserList',null,function(Js){
|
|
|
|
|
|
|
+ OnBtClick_Invite: function () {
|
|
|
|
|
+ var GameClientEngine = this['m_JsGameClientEngine_' + GameDef.KIND_ID]
|
|
|
|
|
+ if (GameClientEngine) {
|
|
|
|
|
+ this.ShowPrefabDLG('ClubInviteUserList', null, function (Js) {
|
|
|
Js.OnSetGameInfor(GameClientEngine);
|
|
Js.OnSetGameInfor(GameClientEngine);
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- OnSetInviteBtShow:function(pIClientUserItem){
|
|
|
|
|
- var GameClientEngine = this['m_JsGameClientEngine_'+GameDef.KIND_ID]
|
|
|
|
|
- if(GameClientEngine&&GameClientEngine.m_dwClubID!=0){
|
|
|
|
|
- this.$('BtInvite').active = pIClientUserItem.GetUserStatus()!= US_LOOKON;
|
|
|
|
|
|
|
+ OnSetInviteBtShow: function (pIClientUserItem) {
|
|
|
|
|
+ var GameClientEngine = this['m_JsGameClientEngine_' + GameDef.KIND_ID]
|
|
|
|
|
+ if (GameClientEngine && GameClientEngine.m_dwClubID != 0) {
|
|
|
|
|
+ this.$('BtInvite').active = pIClientUserItem.GetUserStatus() != US_LOOKON;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
+ /////////////////////////////////////////////////////////////////////////////
|
|
|
});
|
|
});
|