Abstract
场景
class GameScene extends Scene{ preload(){ engine.loader.baseUrl = "." engine.resource.loadTexture("static_img", "ground.png") engine.resource.loadTexture("entity_img", "img.png") } create(){ retrun Container }} Copy
class GameScene extends Scene{ preload(){ engine.loader.baseUrl = "." engine.resource.loadTexture("static_img", "ground.png") engine.resource.loadTexture("entity_img", "img.png") } create(){ retrun Container }}
创建这个场景,返回一个 Container
游戏引擎
预加载,所有需要的资源可以在此处加载
场景
Example