Files
18xchat/assets/Scripts/chat18x/data/PlayerData.ts
T
2025-09-09 10:31:00 +08:00

32 lines
558 B
TypeScript

/**
* 玩家数据
*/
import { BaseData } from "./BaseData";
export class PlayerData extends BaseData {
// 用户名
private _name: string = '';
public reset(): void {
this._name = '';
}
public clear(): void {
this._name = '';
}
public destroy(): void {
super.destroy();
this._name = null;
}
/** 设置用户名 */
public set name(value: string) {
this._name = value;
}
/** 获取用户名 */
public get name(): string {
return this._name;
}
}