Files
node-metaverse/lib/classes/GameObjectLite.ts
Casper Warden 572cd576de Fix lint issues
2018-10-10 10:36:12 +01:00

34 lines
791 B
TypeScript

import {UUID} from './UUID';
import {IGameObject} from './interfaces/IGameObject';
import {NameValue} from './NameValue';
import {PCode} from '../enums/PCode';
export class GameObjectLite implements IGameObject
{
ID: number;
FullID: UUID;
ParentID: number;
OwnerID: UUID;
IsAttachment: boolean;
NameValue: {[key: string]: NameValue};
PCode: PCode;
constructor()
{
this.IsAttachment = false;
}
hasNameValueEntry(key: string): boolean
{
return this.NameValue['AttachItemID'] !== undefined;
}
getNameValueEntry(key: string): string
{
if (this.NameValue['AttachItemID'])
{
return this.NameValue['AttachItemID'].value;
}
return '';
}
}