123456789101112131415161718192021222324252627282930313233 |
- import { _decorator, Component, Node, Label } from 'cc';
- import { ClientEvent } from '../clientEvent';
- import { Constant } from '../constant';
- import { UIButton } from '../gcommon/UIButton';
- const { ccclass, property } = _decorator;
- @ccclass('chat_text_cell')
- export class chat_text_cell extends Component {
- @property(Node)
- lab_str: Node = null; //
- text:string = ""
- start() {
- UIButton.BindClick(this.node,()=>{
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_SHOW_SELF_CHAT,this.text)
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_SHOW_RIVAL_CHAT,this.text)
- ClientEvent.dispatchEvent(Constant.UI_EVENT.UI_MSG_BTN_HIDE_CHAT)
- },this)
- }
- show(str:string){
- this.text = str;
- this.lab_str.getComponent(Label).string = str;
- }
- update(deltaTime: number) {
-
- }
- }
|