update
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from "cc";
|
||||
import { DemoManager } from "../DemoManager";
|
||||
import { Character, characters } from "db://assets/Scripts/test/cfg/characters";
|
||||
import {ViewManager} from "db://assets/Scripts/Main/Manager/ViewManager";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("GirlListItem")
|
||||
@@ -26,19 +27,17 @@ export class GirlListItem extends Component {
|
||||
|
||||
id: number = -1;
|
||||
|
||||
protected onEnable(): void {
|
||||
this.refreshData(1);
|
||||
}
|
||||
|
||||
refreshData(index: number) {
|
||||
const data = characters[index - 1];
|
||||
baseNode: Node;
|
||||
refreshData(data: Character,base:Node) {
|
||||
this.id = data.id;
|
||||
this.girlName.string = data.name;
|
||||
//this.avatar.spriteFrame =
|
||||
this.baseNode = base;
|
||||
}
|
||||
|
||||
onClickDetail() {
|
||||
DemoManager.getInstance().EnterDetail(this.id);
|
||||
//ViewManager.I.closeView(this.baseNode);
|
||||
}
|
||||
|
||||
update(deltaTime: number) {}
|
||||
|
||||
Reference in New Issue
Block a user