Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Npc Class Reference

#include <Npc.h>

+ Inheritance diagram for Npc:
+ Collaboration diagram for Npc:

Public Member Functions

 Npc ()=default
 
virtual ~Npc () override=default
 
virtual EntityType GetEntityType () const override
 
- Public Member Functions inherited from GameObject
 GameObject ()
 
virtual ~GameObject () override=default
 
virtual ObjectType GetObjectType () const
 
void SetPosition (Vector &_p)
 
Vector GetPosition () const
 
Vector GetRenderPosition () const
 
void SetSize (float w, float h)
 
void GetSize (float &w, float &h) const
 
SDL_FRect GetBoundingBox () const
 
void SetBoundingbox (const SDL_FRect &box)
 
void SetDynamic (bool b)
 
bool IsDynamic () const
 
virtual void OnEvent (const Message &msg) override
 
void Render ()
 
std::string Save () const
 
bool Load (const std::string &json)
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void Process ()
 
uint64_t GetUID () const
 

Static Public Member Functions

static ObjectCreate ()
 
- Static Public Member Functions inherited from GameObject
static ObjectCreate ()
 

Static Public Attributes

static bool FactoryRegistered = ObjectFactory::Get().Register("Npc", Npc::Create)
 
- Static Public Attributes inherited from GameObject
static bool FactoryRegistered = ObjectFactory::Get().Register("GameObject", Create)
 

Additional Inherited Members

- Public Attributes inherited from Object
std::string name = "unnamed_object"
 
- Protected Attributes inherited from GameObject
Vector position
 
Vector vRenderPosition
 
float width = 100.0f
 
float height = 150.0f
 
SDL_FRect boundingBox = { 0.0f, 0.0f, 0.0f, 0.0f }
 
bool isDynamic = false
 
- Protected Attributes inherited from Object
uint64_t uid = 0
 

Detailed Description

Definition at line 13 of file Npc.h.

Constructor & Destructor Documentation

◆ Npc()

Npc::Npc ( )
default

Referenced by Create().

+ Here is the caller graph for this function:

◆ ~Npc()

virtual Npc::~Npc ( )
overridevirtualdefault

Member Function Documentation

◆ Create()

Object * Npc::Create ( )
static

Definition at line 14 of file Npc.cpp.

References ObjectFactory::AddComponent(), ObjectFactory::Get(), GetComponentTypeID_Static(), and Npc().

+ Here is the call graph for this function:

◆ GetEntityType()

virtual EntityType Npc::GetEntityType ( ) const
inlineoverridevirtual

Reimplemented from GameObject.

Definition at line 20 of file Npc.h.

References NPC.

Member Data Documentation

◆ FactoryRegistered

bool Npc::FactoryRegistered = ObjectFactory::Get().Register("Npc", Npc::Create)
static

Definition at line 22 of file Npc.h.


The documentation for this class was generated from the following files: