24 lines
496 B
TypeScript
24 lines
496 B
TypeScript
import { _decorator, Component, Label, Node, Sprite } from "cc";
|
|||
|
|
import { DemoManager } from "./DemoManager";
|
||
|
|
const { ccclass, property } = _decorator;
|
||
|
|
|
||
|
|
@ccclass("GirlDetailPanel")
|
||
|
|
export class GirlDetailPanel extends Component {
|
||
|
|
@property(Sprite)
|
||
|
|
avatar: Sprite;
|
||
|
|
@property(Label)
|
||
|
|
girlName: Label;
|
||
|
|
@property(Label)
|
||
|
|
desc: Label;
|
||
|
|
|
||
|
|
@property(Node)
|
||
|
|
chatBtn: Node;
|
||
|
|
id = 0;
|
||
|
|
start() {
|
||
|
|
this.id = 1;
|
||
|
|
}
|
||
|
|
OnClickChatBtn() {
|
||
|
|
DemoManager.getInstance().EnterChat(this.id);
|
||
|
|
}
|
||
|
|
}
|