Object on which to add or modify properties
Object with additional properties
class CreepMixin extends Creep {
hasBodyparts(type: BodyPartConstant) {
return this.body.some((b) => b.type == type)
}
}
applyMixin(Creep, CreepMixin)
Generated using TypeDoc
A type-safe way to define properties. https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern