Final commit of T fix
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
#include "util/array.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
template<class T, typename J, class P = T>
|
||||
template<class O, typename J, class P = O>
|
||||
class Prefab {
|
||||
public:
|
||||
/**
|
||||
@ -28,7 +28,7 @@ namespace Dawn {
|
||||
* @param context Custom context that this prefab needs to initialize.
|
||||
* @return The instance of the created prefab.
|
||||
*/
|
||||
static T * create(J *context) {
|
||||
static O * create(J *context) {
|
||||
assertNotNull(context);
|
||||
return P::prefabCreate(context);
|
||||
}
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include "game/DawnGame.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
template<class T>
|
||||
template<class O>
|
||||
class SceneItemPrefab :
|
||||
public SceneItem,
|
||||
public Prefab<T, Scene, T>
|
||||
public Prefab<O, Scene, O>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -21,8 +21,8 @@ namespace Dawn {
|
||||
* @param scene Scene that this prefab is going to be added to.
|
||||
* @return The created prefab instance.
|
||||
*/
|
||||
static T * prefabCreate(Scene *scene) {
|
||||
T *item = scene->createSceneItemOfType<T>();
|
||||
static O * prefabCreate(Scene *scene) {
|
||||
O *item = scene->createSceneItemOfType<O>();
|
||||
item->prefabInit(&scene->game->assetManager);
|
||||
return item;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ void SimpleVNScene::stage() {
|
||||
// Camera
|
||||
this->camera = Camera::create(this);
|
||||
this->camera->transform->lookAt(
|
||||
glm::vec3(0, 0, 3),
|
||||
glm::vec3(0, 0, 2),
|
||||
glm::vec3(0, 0, 0)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user