#pragma once #include "PlayerActorBase.h" #include "PlayerActorHakoniwa.h" #include "YukimaruRacePlayer.h" #include "al/factory/Factory.h" template PlayerActorBase* createPlayerFunction(const char *name); typedef PlayerActorBase* (*CreateHakoniwa)(const char* name); static al::NameToCreator playerEntries[] = { {"PlayerActorHakoniwa", &createPlayerFunction}, {"YukimaruRacePlayer", &createPlayerFunction} }; class PlayerFactory : public al::Factory { public: PlayerFactory() { this->factoryName = "プレイヤー生成"; this->actorTable = playerEntries; this->factoryCount = sizeof(playerEntries)/sizeof(playerEntries[0]); }; };