Added asset manager.

This commit is contained in:
2021-09-26 00:42:35 -07:00
parent 3a94e307d4
commit 4a57adf427
5 changed files with 49 additions and 9 deletions

View File

@ -14,18 +14,14 @@ class TestScene extends Scene {
1, 1, 1, 1
);
this.shader = shaderCreate();
assetShaderLoad(this.shader,
"shaders/textured.vert",
"shaders/textured.frag"
this.shader = this.game.assets.shaderLoad(
"shaders/textured.vert", "shaders/textured.frag", this
);
this.texture = this.game.assets.textureLoad("test_texture.png", this);
this.camera = cameraCreate();
cameraLookAt(this.camera, 3,3,3, 0,0,0);
cameraPerspective(this.camera, 45, 16/9, 0.01, 1000);
this.texture = textureCreate();
assetTextureLoad(this.texture, "test_texture.png");
}
update() {