Final commit of T fix

This commit is contained in:
2023-02-03 06:59:49 -08:00
parent 6e9a54b4f2
commit d8128f1513
4 changed files with 22 additions and 22 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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)
);