1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { _decorator, Component, Node, Vec3, tween } from 'cc';
- import { ClientEvent } from '../clientEvent';
- import { Constant } from '../constant';
- import { UIButton } from '../gcommon/UIButton';
- import GBoardChess from './ChessGame/GBoardChess';
- import UIDialog from './UIDialog';
- const { ccclass, property } = _decorator;
- @ccclass('ChatAndMenu')
- export class ChatAndMenu extends Component {
- @property(Node)
- btn_menu: Node = null;
- @property(Node)
- btn_chat: Node = null;
- @property(Node)
- caidan_list:Node=null;//菜单列表
- start() {
- UIButton.BindClick(this.btn_chat,function(){
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_BTN_SHOW_CHAT)
- }, this)
- UIButton.BindClick(this.btn_menu,function(){
- if(this.caidan_list.active){
- this.caidan_list.active= false;
- return
- }
- this.caidan_list.scale = new Vec3(0,0,0)
- this.caidan_list.active = true;
- tween()
- .target(this.caidan_list)
- .to(0.2,{scale:new Vec3(1.1,1.1,1)})
- .delay(0.2)
- .call(()=>{
- this.caidan_list.scale = new Vec3(1,1,1)
- })
- .start()
- }, this)
- }
- update(deltaTime: number) {
-
- }
- }
|