32 lines
782 B
C++
32 lines
782 B
C++
#include "MeshShadingDemoGame.h"
|
|||
|
|
#include "Actor/FlyCam.h"
|
||
|
|
#include "Seele/Asset/AssetRegistry.h"
|
||
|
|
#include "Seele/Component/Transform.h"
|
||
|
|
#include "System/FlyCamSystem.h"
|
||
|
|
|
||
|
|
MeshShadingDemoGame::MeshShadingDemoGame()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
MeshShadingDemoGame::~MeshShadingDemoGame()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
|
||
|
|
{
|
||
|
|
cube = new StaticMeshActor(scene, AssetRegistry::findMesh("cube"));
|
||
|
|
// cube->accessComponent<Component::Transform>().setScale(Vector(50, 50, 50));
|
||
|
|
camera = new FlyCam(scene);
|
||
|
|
light = new DirectionalLightActor(scene, Vector4(1, 1, 1, 1), Vector(0, -1, 0));
|
||
|
|
graph->addSystem(new FlyCamSystem(scene));
|
||
|
|
}
|
||
|
|
|
||
|
|
Game* createInstance()
|
||
|
|
{
|
||
|
|
return new MeshShadingDemoGame();
|
||
|
|
}
|
||
|
|
|
||
|
|
void destroyInstance(Game *game)
|
||
|
|
{
|
||
|
|
delete game;
|
||
|
|
}
|