Witch-Game/src/Actors/ActorFactory.cpp

17 lines
No EOL
402 B
C++

#include "ActorFactory.h"
#include <memory>
std::shared_ptr<Actor> ActorFactory::CreateActor(SDL_FRect hitbox)
{
auto actor = std::make_shared<Actor>(Actor(hitbox));
actor ->Init();
return actor;
}
std::shared_ptr<MovingActor> ActorFactory::CreateMovingActor(SDL_FRect hitbox)
{
auto actor = std::make_shared<MovingActor>(MovingActor(hitbox));
actor ->Init();
return actor;
}