Files
node-metaverse/lib/classes/GameObjectLite.ts
Casper Warden 9eee7f9716 - Implement 3D space rtree-based indexing in the Full ObjectStore
- Implement ScriptDialogReply thanks to Hintswen
- Add a rudimentary object search - doesn't work fully yet because of the missing messages
2018-10-12 17:31:14 +01:00

36 lines
892 B
TypeScript

import {UUID} from './UUID';
import {IGameObject} from './interfaces/IGameObject';
import {NameValue} from './NameValue';
import {PCode} from '../enums/PCode';
import {ITreeBoundingBox} from './interfaces/ITreeBoundingBox';
export class GameObjectLite implements IGameObject
{
rtreeEntry?: ITreeBoundingBox;
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 '';
}
}