refactor: controlled instance
This commit is contained in:
parent
a53be624d3
commit
90d8ee3a35
|
@ -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'},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user