123456789101112131415161718192021222324252627282930 |
- import { _decorator, Component, Node, Sprite } from 'cc';
- import { ClientEvent } from '../clientEvent';
- import { Constant } from '../constant';
- import { ResMng } from '../gcommon/ResMng';
- import { UIButton } from '../gcommon/UIButton';
- const { ccclass, property } = _decorator;
- @ccclass('emote')
- export class emote extends Component {
- emote_index:number = 0;
- start() {
- UIButton.BindClick(this.node,()=>{
- console.log("emote_index",this.emote_index)
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_SHOW_SELF_EMOTE,this.emote_index)
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_SHOW_RIVAL_EMOTE,this.emote_index)
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_BTN_HIDE_CHAT)
- },this)
- }
- update(deltaTime: number) {
-
- }
- show(index:number){
- this.emote_index = index;
- ResMng.LoadEmote("Game_Images_chat_emote_exp_"+index,this.node.getComponent(Sprite))
- }
- }
|