view.entity-module.ContainerBasedEntity.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of module-entities Show documentation
Show all versions of module-entities Show documentation
Entity Manager module for the CodinGame engine toolkit. Simplify the management of shapes and drawings.
import { Entity } from './Entity.js'
/* global PIXI */
export class ContainerBasedEntity extends Entity {
constructor () {
super()
Object.assign(this.defaultState, {
children: []
})
}
initDisplay () {
super.initDisplay()
this.graphics = new PIXI.Container()
}
updateDisplay (state, changed, globalData) {
super.updateDisplay(state, changed, globalData)
}
get childrenContainer () {
return this.graphics
}
}