refactor: controlled instance

This commit is contained in:
cha0s 2024-06-29 06:38:19 -05:00
parent a53be624d3
commit 90d8ee3a35

View File

@ -1,12 +1,17 @@
import Component from '@/ecs/component.js'; import Component from '@/ecs/component.js';
export default class Controlled extends Component { export default class Controlled extends Component {
instanceFromSchema() {
return class ControlledInstance extends super.instanceFromSchema() {
toJSON() {
return {};
}
}
}
static properties = { static properties = {
locked: {type: 'uint8'},
moveUp: {type: 'float32'}, moveUp: {type: 'float32'},
moveRight: {type: 'float32'}, moveRight: {type: 'float32'},
moveDown: {type: 'float32'}, moveDown: {type: 'float32'},
moveLeft: {type: 'float32'}, moveLeft: {type: 'float32'},
changeSlot: {type: 'int8'},
}; };
} }