SuperMarioOdysseyOnline/include/al/factory/ActorFactory.h

29 lines
619 B
C
Raw Normal View History

2022-06-16 21:33:18 +00:00
#pragma once
#include "Factory.h"
#include "logger.hpp"
namespace al {
template <class T>
LiveActor* createActorFunction(const char *name);
template <class T>
LiveActor *createCustomActor(const char *name)
{
return new T(name);
};
class LiveActor;
typedef LiveActor* (*createActor)(const char* name);
class ActorFactory : public Factory<createActor> {
public:
ActorFactory(const char *fName) {
this->factoryName = fName;
this->actorTable = nullptr;
this->factoryCount = 0;
};
};
}