35 lines
849 B
TypeScript
35 lines
849 B
TypeScript
import { _decorator, Component, Label, Node, Sprite } from 'cc';
|
|
import {Theme} from "db://assets/Scripts/Main/Config/Config18x";
|
|
import {GButton} from "db://assets/Scripts/Main/Common/GButton";
|
|
import {DemoManager} from "db://assets/Scripts/test/DemoManager";
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('ThemeItem')
|
|
export class ThemeItem extends Component {
|
|
@property(Sprite)
|
|
lockImg: Sprite;
|
|
@property(Label)
|
|
titleName:Label;
|
|
|
|
private id:number;
|
|
|
|
start()
|
|
{
|
|
}
|
|
refresh(themeData:Theme)
|
|
{
|
|
this.lockImg.node.active = !themeData.isRelease;
|
|
this.titleName.string = themeData.name;
|
|
this.id = themeData.themeId;
|
|
GButton.RemoveAndBandClick(this.node,this.OnClickThis,this);
|
|
|
|
}
|
|
|
|
OnClickThis()
|
|
{
|
|
DemoManager.getInstance().EnterGirlList(this.id);
|
|
}
|
|
}
|
|
|
|
|