Skip to content

Instantly share code, notes, and snippets.

@evilpaul-atebit
Created January 10, 2019 11:38
if (this.config.bulletType == 'simple') {
this.spawnFunction = (xPos, yPos, direction) => new SimpleBulletObject(xPos, yPos, direction);
} else if (this.config.bulletType == 'score') {
this.spawnFunction = (xPos, yPos, direction) => new ScoreBulletObject(xPos, yPos, direction);
} else {
logManager.warning('Unknown bullet type "' + type + '" in spawner config. Defaulting to "simple"')
this.spawnFunction = (xPos, yPos, direction) => new SimpleBulletObject(xPos, yPos, direction);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment