Added test code for scripts
This commit is contained in:
parent
b04789945f
commit
21a3d6ecd7
|
@ -7,6 +7,7 @@
|
|||
#include "Graphics/MiddleEnd/Interface/SHRenderable.h"
|
||||
#include "Scene/SHSceneManager.h"
|
||||
#include "Graphics/MiddleEnd/Interface/SHGraphicsSystem.h"
|
||||
#include "Scripting/SHScriptEngine.h"
|
||||
|
||||
using namespace SHADE;
|
||||
|
||||
|
@ -42,6 +43,8 @@ namespace Sandbox
|
|||
renderable.Mesh = CUBE_MESH;
|
||||
renderable.SetMaterial(matInst);
|
||||
renderable.TransformMatrix.Translate(0.0f, 0.0f, 2.0f);
|
||||
SHADE::SHScriptEngine* scriptEngine = static_cast<SHADE::SHScriptEngine*>(SHADE::SHSystemManager::GetSystem<SHADE::SHScriptEngine>());
|
||||
scriptEngine->AddScript(*SHADE::SHEntityManager::GetEntityByID(entity), "TestScript");
|
||||
}
|
||||
void SBTestScene::Update(float dt)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue