/** * 账号数据 */ import { BaseData } from "./BaseData"; export class AccountData extends BaseData { // 身份识别码,游客的话是设备号,googleplay用户的话是gp平台uid private _identifier = ""; // 身份类型,1:游客;2:微信;3:googleplay private _identityType = 1; // 玩家Uid private _uid = ""; // 是否新手 private _isNewGuide = true; // 是否刚注册 private _isNewRegist = true; public reset(): void { this._identifier = ""; this._identityType = 1; this._uid = ""; this._isNewGuide = true; this._isNewRegist = true; } public clear(): void { this._identifier = ""; this._identityType = 1; this._uid = ""; this._isNewGuide = true; this._isNewRegist = true; } public destroy(): void { super.destroy(); this._identifier = null; this._identityType = null; this._uid = null; this._isNewGuide = null; this._isNewRegist = null; } /** 设置身份识别码 */ public set identifier(value: string) { this._identifier = value; } /** 获取身份识别码 */ public get identifier(): string { return this._identifier; } /** 设置身份类型 */ public set identityType(value: number) { this._identityType = value; } /** 获取身份类型 */ public get identityType(): number { return this._identityType; } /** 设置玩家Uid */ public set uid(value: string) { this._uid = value; } /** 获取玩家Uid */ public get uid(): string { return this._uid; } /** 设置是否新手 */ public set isNewGuide(value: boolean) { this._isNewGuide = value; } /** 获取是否新手 */ public get isNewGuide(): boolean { return this._isNewGuide; } /** 设置是否刚注册 */ public set isNewRegist(value: boolean) { this._isNewRegist = value; } /** 获取是否刚注册 */ public get isNewRegist(): boolean { return this._isNewRegist; } }