Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
AI_Npc.cpp
Go to the documentation of this file.
1/*
2 Purpose: Implementation of AI_Npc class for non-player character behavior in a game.
3*/
4#include "AI_Npc.h"
5#include "GameObject.h"
6#include "ObjectFactory.h"
7
8
11{
12 return new AI_Npc();
13}
14
16{
17 // Constructor logic (if any) goes here
18
19}
20
24
26{
27 if (!_owner)
28 {
29 SYSTEM_LOG << "Error AI_Npc::SetOwner called with null owner!\n";
30 return;
31 }
32 owner = _owner;
33
34}
35
37{
38}
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
static ObjectComponent * Create(void)
Definition AI_Npc.cpp:10
virtual void SetOwner(Object *_owner) override
Definition AI_Npc.cpp:25
AI_Npc()
Definition AI_Npc.cpp:15
virtual void OnEvent(const Message &msg) override
Definition AI_Npc.cpp:36
virtual ~AI_Npc() override
Definition AI_Npc.cpp:21
static bool FactoryRegistered
Definition AI_Npc.h:10
bool Register(const std::string &className, CreatorFunction creator)
Enregistre une fonction de cr�ation pour un nom de classe donn�.
static ObjectFactory & Get()
#define SYSTEM_LOG