chore: dead code
This commit is contained in:
parent
12a70ee94e
commit
909cc388f2
|
@ -11,7 +11,6 @@ import {
|
|||
import {SynchronizedMixin} from '@avocado/net';
|
||||
import {Resource} from '@avocado/resource';
|
||||
|
||||
import {EntityCreatePacket} from './packets/entity-create.packet';
|
||||
import {hasTrait, lookupTrait} from './trait/registry';
|
||||
import {EntityUpdateTraitPacket} from './packets/entity-update-trait.packet';
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
export {Entity} from './entity.synchronized';
|
||||
|
||||
export {EntityCreatePacket} from './packets/entity-create.packet';
|
||||
export {EntityRemovePacket} from './packets/entity-remove.packet';
|
||||
export {EntityPacket} from './packets/entity.packet';
|
||||
|
||||
export {
|
||||
EntityListUpdateEntityPacket,
|
||||
} from './packets/entity-list-update-entity.packet';
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
import msgpack from 'msgpack-lite';
|
||||
|
||||
import {EntityPacket} from './entity.packet';
|
||||
|
||||
export class EntityCreatePacket extends EntityPacket {
|
||||
|
||||
constructor(data, entity) {
|
||||
if ('undefined' !== typeof entity) {
|
||||
data.layer = entity.layer.index;
|
||||
}
|
||||
super(data, entity);
|
||||
}
|
||||
|
||||
static pack(packet) {
|
||||
return this.builder.encode({
|
||||
_id: packet.data[0],
|
||||
data: msgpack.encode(packet.data[1]),
|
||||
})
|
||||
}
|
||||
|
||||
static get schema() {
|
||||
return {
|
||||
...super.schema,
|
||||
data: 'buffer',
|
||||
};
|
||||
}
|
||||
|
||||
static unpack(packet) {
|
||||
const {data} = this.builder.decode(packet);
|
||||
return msgpack.decode(data);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
import {EntityPacket} from './entity.packet';
|
||||
|
||||
export class EntityRemovePacket extends EntityPacket {}
|
|
@ -1,22 +0,0 @@
|
|||
import {Packet} from '@avocado/net';
|
||||
|
||||
export class EntityPacket extends Packet {
|
||||
|
||||
constructor(data, entity) {
|
||||
if ('undefined' !== typeof entity) {
|
||||
data.uuid = entity.numericUid;
|
||||
}
|
||||
super(data);
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
static get schema() {
|
||||
return {
|
||||
...super.schema,
|
||||
data: {
|
||||
uuid: 'uint32',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
import {EntityPacket} from '@avocado/entity';
|
||||
// export class TraitAlivePacket extends EntityPacket {
|
||||
|
||||
export class TraitAlivePacket extends EntityPacket {
|
||||
// static get schema() {
|
||||
// const schema = super.schema;
|
||||
// schema.data.life = 'uint16';
|
||||
// schema.data.maxLife = 'uint16';
|
||||
// return schema;
|
||||
// }
|
||||
|
||||
static get schema() {
|
||||
const schema = super.schema;
|
||||
schema.data.life = 'uint16';
|
||||
schema.data.maxLife = 'uint16';
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
// }
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import {EntityPacket} from './entity.packet';
|
||||
// export class TraitDirectionalPacket extends EntityPacket {
|
||||
|
||||
export class TraitDirectionalPacket extends EntityPacket {
|
||||
// static get schema() {
|
||||
// const schema = super.schema;
|
||||
// schema.data.direction = 'uint8';
|
||||
// return schema;
|
||||
// }
|
||||
|
||||
static get schema() {
|
||||
const schema = super.schema;
|
||||
schema.data.direction = 'uint8';
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
// }
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import {EntityPacket} from '@avocado/entity';
|
||||
// export class TraitVisiblePacket extends EntityPacket {
|
||||
|
||||
export class TraitVisiblePacket extends EntityPacket {
|
||||
// static get schema() {
|
||||
// const schema = super.schema;
|
||||
// schema.data.isVisible = 'bool';
|
||||
// schema.data.opacity = 'uint8';
|
||||
// return schema;
|
||||
// }
|
||||
|
||||
static get schema() {
|
||||
const schema = super.schema;
|
||||
schema.data.isVisible = 'bool';
|
||||
schema.data.opacity = 'uint8';
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
// }
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import {EntityPacket} from '@avocado/entity';
|
||||
// export class TraitAnimatedPacket extends EntityPacket {
|
||||
|
||||
export class TraitAnimatedPacket extends EntityPacket {
|
||||
// static get schema() {
|
||||
// const schema = super.schema;
|
||||
// schema.data.currentAnimation = 'string';
|
||||
// schema.data.isAnimating = 'bool';
|
||||
// return schema;
|
||||
// }
|
||||
|
||||
static get schema() {
|
||||
const schema = super.schema;
|
||||
schema.data.currentAnimation = 'string';
|
||||
schema.data.isAnimating = 'bool';
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
// }
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||
import {
|
||||
Entity,
|
||||
EntityCreatePacket,
|
||||
EntityList,
|
||||
EntityListUpdateEntityPacket,
|
||||
} from '@avocado/entity';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import * as I from 'immutable';
|
||||
|
||||
import {arrayUnique, compose, EventEmitter, flatten} from '@avocado/core';
|
||||
import {EntityCreatePacket} from '@avocado/entity';
|
||||
|
||||
import {Layer} from './layer';
|
||||
import {LayersUpdateLayerPacket} from './packets/layers-update-layer.packet';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import * as I from 'immutable';
|
||||
|
||||
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||
import {EntityCreatePacket, EntityPacket, EntityRemovePacket} from '@avocado/entity';
|
||||
import {Vector} from '@avocado/math';
|
||||
import {SynchronizedMixin} from '@avocado/net';
|
||||
import {RectangleShape} from '@avocado/physics';
|
||||
|
|
Loading…
Reference in New Issue
Block a user