| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- var SelGame = window.clientName + '_C_G'
- cc.Class({
- extends: cc.BaseClass,
- properties: {
- m_ldiamond: cc.Label,
- },
- ctor: function () {
- this.m_RoomType = 0;// 0普通 1俱乐部
- this.m_personIndex = 1;
- this.m_playMethod = 0;
- },
- onLoad: function () {
- this._Sub = [];
- this._Sub.push(this.$('NewNode/Sub1'));
- // this._Sub.push(this.$('NewNode/Sub2'));
- // this._Sub.push(this.$('NewNode/Sub3'));
- this.updateDiamond()
- },
- OnShowView: function () {
- if (this.m_FirstCtrl == null) {
- this.m_FirstCtrl = this.$('LeftBG/Layout/T0@Toggle');
- this.m_FirstCtrl.isChecked = false;
- this.m_FirstCtrl.check();
- }
- return
- },
- OnSetRoomType: function (type) {
- this.m_RoomType = type;
- this.FilterGame(type);
- },
- FilterGame: function (type) {
- // this.$('NewNode/Sub2/view/content/63500').active = type>0;
- },
- OnTogClick: function (tag, data) {
- // console.log('data:'+data);
- // for(let i =0;i<3;i++){
- // this._Sub[i].active = false;
- // }
- // this._Sub[data].active = true;
- },
- onClickPlayMethod: function (data, tag) {
- console.log("点击玩法", tag)
- this.m_playMethod = tag;
- },
- OnClickButtonPerson: function (data, tag) {
- console.log("点击Person", tag)
- this.m_personIndex = tag;
- },
- OnClickButtonMatch: function (data, tag) {
- console.log("点击data", tag)
- this.m_Hook.matchRoom(this.m_personIndex, tag,this.m_playMethod)
- // this.ShowPrefabDLG('CreateRoom2',null,(Js)=>{
- // Js.OnSetGameID(tag.currentTarget.name);
- // Js.OnClubAutoView(this.m_RoomType);
- // });
- },
- OnCreateRoom: function (KindID, dwRules, dwServerRules, Name) {
- this.m_Hook.OnCreateRoom(KindID, dwRules, dwServerRules, Name, 0, 0);
- this.HideView();
- },
- updateDiamond: function () {
- let diamond = g_GlobalUserInfo.GetGlobalUserData().llUserIngot;
- this.m_ldiamond.string = diamond;
- },
- });
|