I want to make my fish(fish_) can transform to another form (fishFly_) while jumping, and I wrote a function called "jump" to do so.
But when I was trying to change the .visible of them, console gave me:
Uncaught ReferenceError: fish_ is not defined
at jump (game.js:142) //the line of "fish_.visible = true;" in "else statement" of "jump function"
at t.fn (game.js:127) //which is the line of app.ticker
at t.emit (TickerListener.ts:107)
at e.update (Ticker.ts:479)
at _tick (Ticker.ts:187)
seems like I used the wrong way to change it.