[BREAKING CHANGES] - Add new commands module for the Friends list, add new events for friends online/offline, friend rights management, friend map lookup

This commit is contained in:
Casper Warden
2018-10-12 14:34:43 +01:00
parent 375abc433e
commit 2a0c4dc3e8
86 changed files with 1406 additions and 330 deletions

43
dist/classes/Vector2.js vendored Normal file
View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const vec2_1 = require("../tsm/vec2");
class Vector2 extends vec2_1.vec2 {
static getZero() {
return new Vector2();
}
constructor(buf, pos, double) {
if (double === undefined) {
double = false;
}
if (buf !== undefined && pos !== undefined && buf instanceof Buffer) {
if (!double) {
const x = buf.readFloatLE(pos);
const y = buf.readFloatLE(pos + 4);
super([x, y]);
}
else {
const x = buf.readDoubleLE(pos);
const y = buf.readDoubleLE(pos + 8);
super([x, y]);
}
}
else if (buf !== undefined && Array.isArray(buf)) {
super(buf);
}
else {
super();
}
}
writeToBuffer(buf, pos, double) {
if (double) {
buf.writeDoubleLE(this.x, pos);
buf.writeDoubleLE(this.y, pos + 8);
}
else {
buf.writeFloatLE(this.x, pos);
buf.writeFloatLE(this.y, pos + 4);
}
}
}
exports.Vector2 = Vector2;
//# sourceMappingURL=Vector2.js.map