| 123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // Polycode template. Write your code here.
- //
- #include "PolycodeTemplateApp.h"
- PolycodeTemplateApp::PolycodeTemplateApp(PolycodeView *view) {
- core = new POLYCODE_CORE(view, 1280,720,false,false, 0,0,60);
-
- //core->addFileSource("archive", "default.pak");
- ResourcePool *globalPool = Services()->getResourceManager()->getGlobalPool();
- globalPool->loadResourcesFromFolder("default", true);
-
- SceneLabel::createMipmapsForLabels = false;
- MaterialManager *materialManager = Services()->getMaterialManager();
- // Write your code here!
-
- Scene *scene = new Scene(Scene::SCENE_2D);
- scene->useClearColor = true;
-
- ScenePrimitive *test = new ScenePrimitive(ScenePrimitive::TYPE_VPLANE, 0.5, 0.5);
- test->setMaterialByName("Unlit");
- test->getLocalShaderOptions()->loadTextureForParam("diffuse", "main_icon.png");
- scene->addChild(test);
- Sound *bgSound = new Sound("bedlayer_main.wav");
- bgSound->Play();
- }
- PolycodeTemplateApp::~PolycodeTemplateApp() {
-
- }
- bool PolycodeTemplateApp::Update() {
- return core->updateAndRender();
- }
|