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

#include <AI_Npc.h>

+ Inheritance diagram for AI_Npc:
+ Collaboration diagram for AI_Npc:

Public Member Functions

 AI_Npc ()
 
virtual ~AI_Npc () override
 
virtual void SetOwner (Object *_owner) override
 
virtual void Process () override
 
virtual void OnEvent (const Message &msg) override
 
- Public Member Functions inherited from AIComponent
 AIComponent ()=default
 
virtual ~AIComponent () override=default
 
virtual ComponentType GetComponentType () const override
 
- Public Member Functions inherited from ObjectComponent
 ObjectComponent ()=default
 
virtual ~ObjectComponent ()=default
 
ObjectGetEntity () const
 
virtual void SetEntity (Object *_owner)
 
virtual void Initialize ()
 
virtual void Render ()
 
virtual void RenderDebug ()
 
ObjectGetOwner () const
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
uint64_t GetUID () const
 

Static Public Member Functions

static ObjectComponentCreate (void)
 

Static Public Attributes

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

Private Types

enum class  State { Idle , Patrolling , Chasing , Fleeing }
 

Private Attributes

State m_currentState = State::Idle
 
std::mutex m_mutex
 

Additional Inherited Members

- Public Attributes inherited from Object
std::string name = "unnamed_object"
 
- Protected Attributes inherited from ObjectComponent
Objectowner = nullptr
 
GameObjectgao = nullptr
 
- Protected Attributes inherited from Object
uint64_t uid = 0
 
- Static Protected Attributes inherited from ObjectComponent
static floatfDt = GameEngine::fDt
 

Detailed Description

Definition at line 7 of file AI_Npc.h.

Member Enumeration Documentation

◆ State

enum class AI_Npc::State
strongprivate
Enumerator
Idle 
Patrolling 
Chasing 
Fleeing 

Definition at line 20 of file AI_Npc.h.

Constructor & Destructor Documentation

◆ AI_Npc()

AI_Npc::AI_Npc ( )
explicit

Definition at line 15 of file AI_Npc.cpp.

Referenced by Create().

+ Here is the caller graph for this function:

◆ ~AI_Npc()

AI_Npc::~AI_Npc ( )
overridevirtual

Definition at line 21 of file AI_Npc.cpp.

Member Function Documentation

◆ Create()

ObjectComponent * AI_Npc::Create ( void  )
static

Definition at line 10 of file AI_Npc.cpp.

References AI_Npc().

+ Here is the call graph for this function:

◆ OnEvent()

void AI_Npc::OnEvent ( const Message msg)
overridevirtual

Reimplemented from AIComponent.

Definition at line 36 of file AI_Npc.cpp.

◆ Process()

virtual void AI_Npc::Process ( )
inlineoverridevirtual

Reimplemented from AIComponent.

Definition at line 16 of file AI_Npc.h.

◆ SetOwner()

void AI_Npc::SetOwner ( Object _owner)
overridevirtual

Reimplemented from AIComponent.

Definition at line 25 of file AI_Npc.cpp.

References GetComponentTypeID_Static(), ObjectComponent::owner, and SYSTEM_LOG.

+ Here is the call graph for this function:

Member Data Documentation

◆ FactoryRegistered

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

Definition at line 10 of file AI_Npc.h.

◆ m_currentState

State AI_Npc::m_currentState = State::Idle
private

Definition at line 27 of file AI_Npc.h.

◆ m_mutex

std::mutex AI_Npc::m_mutex
private

Definition at line 28 of file AI_Npc.h.


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