33 lines
786 B
C++
33 lines
786 B
C++
#pragma once
|
|
|
|
#include "libtcod.hpp"
|
|
#include "Persistance.h"
|
|
|
|
class Attacker;
|
|
class Destructible;
|
|
class Ai;
|
|
class Pickable;
|
|
class Container;
|
|
|
|
class Actor : public Persistent {
|
|
public:
|
|
|
|
int x, y; // position on map
|
|
std::string ch; // ascii code
|
|
TCOD_ColorRGB col; // color
|
|
std::string name;
|
|
bool blocks;
|
|
Attacker* attacker;
|
|
Destructible* destructible;
|
|
Ai* ai;
|
|
Pickable* pickable; // something that can be picked and used
|
|
Container* container; // something that can contain actors
|
|
float getDistance(int cx, int cy) const;
|
|
Actor(int x, int y, std::string_view ch, std::string name, const TCOD_ColorRGB& col);
|
|
~Actor();
|
|
void render(TCOD_Console& cons) const;
|
|
void update();
|
|
void load(TCODZip& zip);
|
|
void save(TCODZip& zip);
|
|
|
|
}; |