12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import { _decorator, Component, Node } from 'cc';
- import { ClientEvent } from '../clientEvent';
- import { Constant, matching_5_10_20_type, room_type } from '../constant';
- import ChessMng, { ChessType } from '../Game/DiffSel/ChessMng';
- import { GameMng } from '../GameMng';
- import ScenceMng from '../gcommon/ScenceMng';
- import { UIButton } from '../gcommon/UIButton';
- import { UIManager } from '../gcommon/UIManager';
- import { native_manager } from '../native_manager';
- import { msgManager } from '../socket/msgManager';
- import { roomData } from '../UserData/roomData';
- const { ccclass, property } = _decorator;
- @ccclass('tongqianCreate')
- export class tongqianCreate extends Component {
- @property(Node)
- btn_chuji: Node = null; //
- @property(Node)
- btn_zhongji: Node = null; //
- @property(Node)
- btn_gaoji: Node = null; //
- @property(Node)
- btn_ads_tongqian: Node = null; //
- start() {
- let self = this;
- UIButton.BindClick(this.btn_chuji,()=>{
- this.sendMsg(room_type._chuji_tongqian)
- },this)
- UIButton.BindClick(this.btn_zhongji,()=>{
- this.sendMsg(room_type._zhongji_tongqian)
- },this)
- UIButton.BindClick(this.btn_ads_tongqian,()=>{
- native_manager.showRewardVideo()
- },this)
-
- }
- sendMsg(type:room_type){
- switch (type) {
- case room_type._chuji_tongqian:
- msgManager.createRoomByRoomType(room_type._chuji_tongqian)
- break;
- case room_type._zhongji_tongqian:
- msgManager.createRoomByRoomType(room_type._zhongji_tongqian)
- break;
- }
- UIManager.AddPrefab(GameMng.Instance.uiloading)
- }
- onDestroy(){
-
- }
- }
|