WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Public Member Functions | Public Attributes | List of all members
Creature Class Reference

#include <Creature.hpp>

Inheritance diagram for Creature:
Inheritance graph
[legend]
Collaboration diagram for Creature:
Collaboration graph
[legend]

Public Member Functions

 Creature ()
 
void init (int _sex=0)
 
virtual void incrementTicks (int=1)
 
virtual void wander () override
 
Texture * currentTexture () override
 
void die ()
 
bool hasSeen (World_Local *, int, int)
 
std::string getColumn (std::string _column) override
 
std::string getColumnType (std::string _column) override
 
virtual void attack (Creature *, Creature_Attack *)
 
virtual void attack (Character *, Creature_Attack *)
 
void updateKnowledge ()
 
void updateKnowledgeIdle ()
 
virtual std::string getName () override
 
- Public Member Functions inherited from WorldObject
 WorldObject ()
 
virtual ~WorldObject ()
 
virtual std::string getExtendedInfo ()
 
int distanceTo (WorldObject *)
 
int distanceFrom (WorldObject *)
 
int distanceTo (int, int)
 
std::string getBaseData ()
 
std::string getSaveData ()
 
void loadData (std::string)
 

Public Attributes

bool isMale
 
int age
 
int daysCounter
 
int secondsCounter
 
bool isCarnivore
 
int actionPoints
 
bool isAlive
 
int health
 
int hunger
 
int thirst
 
short int fleeCounter
 
World_Localmap
 
Creature_Knowledgeknowledge
 
Creature_Speciesspecies
 
int nPelt
 
int nMeat
 
Vector< Creature_Attack * > vAttack
 
Texture * baseTexture
 
- Public Attributes inherited from WorldObject
short int x
 
short int y
 
bool isUnderground
 
long unsigned int fullX
 
long unsigned int fullY
 
int worldX
 
int worldY
 
bool stackable
 
double weight
 
double bulk
 
bool blocksView
 
bool blocksMovement
 
bool canCook
 
int chopAmount
 
bool canHarvest
 

Constructor & Destructor Documentation

◆ Creature()

Creature::Creature ( )

Member Function Documentation

◆ attack() [1/2]

virtual void Creature::attack ( Creature ,
Creature_Attack  
)
inlinevirtual

◆ attack() [2/2]

virtual void Creature::attack ( Character ,
Creature_Attack  
)
inlinevirtual

◆ currentTexture()

Texture * Creature::currentTexture ( )
overridevirtual

◆ die()

void Creature::die ( )

◆ getColumn()

std::string Creature::getColumn ( std::string  _column)
override

◆ getColumnType()

std::string Creature::getColumnType ( std::string  _column)
override

◆ getName()

std::string Creature::getName ( )
overridevirtual

◆ hasSeen()

bool Creature::hasSeen ( World_Local _map,
int  _x,
int  _y 
)

◆ incrementTicks()

void Creature::incrementTicks ( int  nTicks = 1)
virtual

◆ init()

void Creature::init ( int  _sex = 0)

◆ updateKnowledge()

void Creature::updateKnowledge ( )

◆ updateKnowledgeIdle()

void Creature::updateKnowledgeIdle ( )

◆ wander()

void Creature::wander ( )
overridevirtual

Member Data Documentation

◆ actionPoints

int Creature::actionPoints

◆ age

int Creature::age

◆ baseTexture

Texture* Creature::baseTexture

◆ daysCounter

int Creature::daysCounter

◆ fleeCounter

short int Creature::fleeCounter

◆ health

int Creature::health

◆ hunger

int Creature::hunger

◆ isAlive

bool Creature::isAlive

◆ isCarnivore

bool Creature::isCarnivore

◆ isMale

bool Creature::isMale

◆ knowledge

Creature_Knowledge* Creature::knowledge

◆ map

World_Local* Creature::map

◆ nMeat

int Creature::nMeat

◆ nPelt

int Creature::nPelt

◆ secondsCounter

int Creature::secondsCounter

◆ species

Creature_Species* Creature::species

◆ thirst

int Creature::thirst

◆ vAttack

Vector<Creature_Attack*> Creature::vAttack

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