Files
Nitro_Render_V3/packages/room/src/messages/ObjectMoveUpdateMessage.ts
T
2024-04-03 09:27:56 +02:00

29 lines
725 B
TypeScript

import { IVector3D } from '@nitrots/api';
import { RoomObjectUpdateMessage } from './RoomObjectUpdateMessage';
export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
{
private _targetLocation: IVector3D;
private _isSlide: boolean;
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false)
{
super(location, direction);
this._targetLocation = targetLocation;
this._isSlide = isSlide;
}
public get targetLocation(): IVector3D
{
if(!this._targetLocation) return this.location;
return this._targetLocation;
}
public get isSlide(): boolean
{
return this._isSlide;
}
}