update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { _decorator, Component, Label, Node, Sprite } from "cc";
|
||||
import { DemoManager } from "./DemoManager";
|
||||
import {Character, characters} from "db://assets/Scripts/test/cfg/characters";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("GirlDetailPanel")
|
||||
@@ -14,8 +15,13 @@ export class GirlDetailPanel extends Component {
|
||||
@property(Node)
|
||||
chatBtn: Node;
|
||||
id = 0;
|
||||
start() {
|
||||
this.id = 1;
|
||||
|
||||
refresh(index:number)
|
||||
{
|
||||
const data = characters[index-1];
|
||||
this.girlName.string = data.name;
|
||||
this.desc.string = data.description;
|
||||
this.id = data.id;
|
||||
}
|
||||
OnClickChatBtn() {
|
||||
DemoManager.getInstance().EnterChat(this.id);
|
||||
|
||||
Reference in New Issue
Block a user