添加奖杯库

This commit is contained in:
2025-05-20 21:05:30 +08:00
parent 7b519c2424
commit 061b8bc042
26 changed files with 773 additions and 0 deletions

24
src/views/TrophyUnit.ts Normal file
View File

@@ -0,0 +1,24 @@
import { config } from "../constants/config";
import { StorageManager } from "../models/StorageManager";
const { regClass, property } = Laya;
@regClass()
export class TrophyUnit extends Laya.Script {
declare owner : Laya.Box;
@property(Laya.Image)
public icon: Laya.Image;
@property(Laya.Label)
public label_count: Laya.Label;
@property(Laya.Label)
public label_month: Laya.Label;
public onInit(year: number, month: number): void {
var user = StorageManager.getInstance().getUser()
var starCount = user.get_doneCountBydate(year, month)
this.label_count.text = `${starCount}/31`
this.label_month.text = config.MONTH_ABBRS[month-1]
}
}