I have a function inside create() and I want to access it from update()
Uncaught ReferenceError: createRabbit is not defined
My example code:
create() {
rabbit = this.physics.add.group()
function createRabbit() {
rabbit.create(100, 100, 'rabbit')
}
}
update() {
if (hello == 1) {
createRabbit()
}
}