You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
feat: support wired movement packets and room sync
This commit is contained in:
@@ -7,9 +7,9 @@ export class ObjectAvatarUpdateMessage extends ObjectMoveUpdateMessage
|
||||
private _canStandUp: boolean;
|
||||
private _baseY: number;
|
||||
|
||||
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, headDirection: number, canStandUp: boolean, baseY: number)
|
||||
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, headDirection: number, canStandUp: boolean, baseY: number, isSlide: boolean = false, duration: number = ObjectMoveUpdateMessage.DEFAULT_DURATION)
|
||||
{
|
||||
super(location, targetLocation, direction);
|
||||
super(location, targetLocation, direction, isSlide, duration);
|
||||
|
||||
this._headDirection = headDirection;
|
||||
this._canStandUp = canStandUp;
|
||||
|
||||
@@ -3,15 +3,19 @@ import { RoomObjectUpdateMessage } from './RoomObjectUpdateMessage';
|
||||
|
||||
export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
|
||||
{
|
||||
public static DEFAULT_DURATION: number = 500;
|
||||
|
||||
private _targetLocation: IVector3D;
|
||||
private _isSlide: boolean;
|
||||
private _duration: number;
|
||||
|
||||
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false)
|
||||
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false, duration: number = ObjectMoveUpdateMessage.DEFAULT_DURATION)
|
||||
{
|
||||
super(location, direction);
|
||||
|
||||
this._targetLocation = targetLocation;
|
||||
this._isSlide = isSlide;
|
||||
this._duration = duration;
|
||||
}
|
||||
|
||||
public get targetLocation(): IVector3D
|
||||
@@ -25,4 +29,9 @@ export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
|
||||
{
|
||||
return this._isSlide;
|
||||
}
|
||||
|
||||
public get duration(): number
|
||||
{
|
||||
return this._duration;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user