You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 23:16:20 +00:00
49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
import { IRoomObject } from '@nitrots/api';
|
|
import { RoomObjectMouseEvent } from './RoomObjectMouseEvent';
|
|
|
|
export class RoomObjectTileMouseEvent extends RoomObjectMouseEvent
|
|
{
|
|
private _tileX: number;
|
|
private _tileY: number;
|
|
private _tileZ: number;
|
|
|
|
constructor(type: string, object: IRoomObject, eventId: string, tileX: number, tileY: number, tileZ: number, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false)
|
|
{
|
|
super(type, object, eventId, altKey, ctrlKey, shiftKey, buttonDown);
|
|
|
|
this._tileX = tileX;
|
|
this._tileY = tileY;
|
|
this._tileZ = tileZ;
|
|
}
|
|
|
|
public get tileX(): number
|
|
{
|
|
return this._tileX;
|
|
}
|
|
|
|
public get tileY(): number
|
|
{
|
|
return this._tileY;
|
|
}
|
|
|
|
public get tileZ(): number
|
|
{
|
|
return this._tileZ;
|
|
}
|
|
|
|
public get tileXAsInt(): number
|
|
{
|
|
return Math.trunc(this._tileX + 0.499);
|
|
}
|
|
|
|
public get tileYAsInt(): number
|
|
{
|
|
return Math.trunc(this._tileY + 0.499);
|
|
}
|
|
|
|
public get tileZAsInt(): number
|
|
{
|
|
return Math.trunc(this._tileZ + 0.499);
|
|
}
|
|
}
|