Got Hello World Working prior to refactor.
This commit is contained in:
@ -6,9 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "scene/Scene.hpp"
|
#include "scene/Scene.hpp"
|
||||||
#include "prefabs/SimpleSpinningCubePrefab.hpp"
|
#include "prefabs/SimpleSpinningCubePrefab.hpp"
|
||||||
#include "prefabs/ui/debug/FPSLabel.hpp"
|
|
||||||
#include "scene/components/ui/UIImage.hpp"
|
#include "scene/components/ui/UIImage.hpp"
|
||||||
#include "display/font/BitmapFont.hpp"
|
|
||||||
|
|
||||||
namespace Dawn {
|
namespace Dawn {
|
||||||
class HelloWorldScene : public Scene {
|
class HelloWorldScene : public Scene {
|
||||||
@ -16,7 +14,6 @@ namespace Dawn {
|
|||||||
Camera *camera;
|
Camera *camera;
|
||||||
SimpleSpinningCubePrefab *cube;
|
SimpleSpinningCubePrefab *cube;
|
||||||
UICanvas *canvas;
|
UICanvas *canvas;
|
||||||
UILabel *label;
|
|
||||||
|
|
||||||
void stage() override {
|
void stage() override {
|
||||||
camera = Camera::create(this);
|
camera = Camera::create(this);
|
||||||
@ -25,12 +22,6 @@ namespace Dawn {
|
|||||||
cube = SimpleSpinningCubePrefab::create(this);
|
cube = SimpleSpinningCubePrefab::create(this);
|
||||||
|
|
||||||
canvas = UICanvas::create(this);
|
canvas = UICanvas::create(this);
|
||||||
|
|
||||||
auto labelItem = FPSLabel::create(this);
|
|
||||||
labelItem->transform.setParent(canvas->transform);
|
|
||||||
labelItem->label->alignX = UI_COMPONENT_ALIGN_END;
|
|
||||||
labelItem->label->alignment = glm::vec4(0, 0, 0, 0);
|
|
||||||
labelItem->label->fontSize = 16;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Asset*> getRequiredAssets() override {
|
std::vector<Asset*> getRequiredAssets() override {
|
||||||
|
Reference in New Issue
Block a user