SuperMarioOdysseyOnline/include/al/factory/ActorFactory.h
2022-06-16 14:33:18 -07:00

29 lines
No EOL
619 B
C++

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