node-insim
Version:
An InSim library for NodeJS with TypeScript support
39 lines (38 loc) • 1.04 kB
JavaScript
import { __decorate } from "tslib";
import { byte, short } from '../../decorators';
import { Struct } from '../base';
export class CarContOBJ extends Struct {
constructor(data) {
super();
/** Car's motion if Speed > 0: 0 = world y direction, 128 = 180 deg */
this.Direction = 0;
/** Direction of forward axis: 0 = world y direction, 128 = 180 deg */
this.Heading = 0;
/** m/s */
this.Speed = 0;
this.Zbyte = 0;
/** Position (1 metre = 16) */
this.X = 0;
/** Position (1 metre = 16) */
this.Y = 0;
this.initialize(data);
}
}
__decorate([
byte()
], CarContOBJ.prototype, "Direction", void 0);
__decorate([
byte()
], CarContOBJ.prototype, "Heading", void 0);
__decorate([
byte()
], CarContOBJ.prototype, "Speed", void 0);
__decorate([
byte()
], CarContOBJ.prototype, "Zbyte", void 0);
__decorate([
short()
], CarContOBJ.prototype, "X", void 0);
__decorate([
short()
], CarContOBJ.prototype, "Y", void 0);