老師。我的圖片為什么沒加載。背景也是。
var?game?=new?Phaser.Game(375,667,Phaser.AUTO); var?helloState={ preload:function?(){ ????game.stage.backgroundColor="#a8d4bf" ????game.load.image("logo","/source/logo.png") ????}, create:function?(){ ????var?text=game.add.text(game.world.centerX,25,"hello?world11",{fill:'#fff'}) ????text.anchor.set(0.5); ????var?logo=game.add.image(game.world.centerX,game.world.centerY,"logo") ????logo.anchor.set(0.5); ????} } game.state.add("helloState",helloState); game.state.start("helloState");
2021-03-31
已經(jīng)看見你評(píng)論了很多,特意在這回一條,加油,在慕課網(wǎng)一起進(jìn)步。還有學(xué)完了,來個(gè)中肯評(píng)價(jià)?
2021-03-18
圖片在哪里加載完成的?
你的背景圖片沒加載,你就一個(gè)hellostate。