2025-05-13 20:31:44 +08:00
|
|
|
|
|
|
|
|
|
2025-05-14 20:05:17 +08:00
|
|
|
import { DataCandy } from "../types/global"
|
2025-05-14 19:22:21 +08:00
|
|
|
import { StorageManager } from "./StorageManager"
|
2025-05-13 20:31:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
export class DOCandy {
|
|
|
|
|
|
2025-05-14 20:05:17 +08:00
|
|
|
private data: DataCandy
|
2025-05-13 20:31:44 +08:00
|
|
|
private show: number
|
|
|
|
|
|
2025-05-14 20:05:17 +08:00
|
|
|
constructor(dataCandy: DataCandy, show: number) {
|
2025-05-13 20:31:44 +08:00
|
|
|
this.data = dataCandy
|
|
|
|
|
this.show = show
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//====================================持久化数据
|
|
|
|
|
public get_left(): number {
|
|
|
|
|
return this.data.left
|
|
|
|
|
}
|
|
|
|
|
public set_left(left: number): void {
|
|
|
|
|
this.data.left = left
|
2025-05-14 10:14:55 +08:00
|
|
|
StorageManager.getInstance().onChanged()
|
2025-05-13 20:31:44 +08:00
|
|
|
}
|
|
|
|
|
//====================================持久化数据
|
|
|
|
|
|
|
|
|
|
public get_show(): number {
|
|
|
|
|
return this.show
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|