#include <actor.h>
|
| Actor () |
|
virtual | ~Actor () |
|
virtual bool | draw (Graphics *graphics, int offsetX, int offsetY) const =0 |
| Draws the Actor to the given graphics context.
|
|
const Vector & | getPosition () const |
| Returns the pixel position of this actor.
|
|
virtual void | setPosition (const Vector &pos) |
| Sets the pixel position of this actor.
|
|
int | getPixelX () const |
| Returns the pixels X coordinate of the actor.
|
|
int | getPixelY () const |
| Returns the pixel Y coordinate of the actor.
|
|
virtual int | getDrawOrder () const |
| Returns the pixel Y coordinate that the actor should be drawn at.
|
|
virtual bool | drawnWhenBehind () const |
| Determines wether the actor should be drawn translucent when behind another object.
|
|
virtual int | getTileX () const |
| Returns the x coordinate in tiles of the actor.
|
|
virtual int | getTileY () const |
| Returns the y coordinate in tiles of the actor.
|
|
virtual float | getAlpha () const =0 |
| Returns the current alpha value used to draw the actor.
|
|
virtual void | setAlpha (float alpha)=0 |
| Sets the alpha value used to draw the actor.
|
|
virtual void | setMap (Map *map) |
|
Map * | getMap () const |
|
Definition at line 34 of file actor.h.
◆ Actor()
◆ ~Actor()
◆ draw()
virtual bool Actor::draw |
( |
Graphics * |
graphics, |
|
|
int |
offsetX, |
|
|
int |
offsetY |
|
) |
| const |
|
pure virtual |
Draws the Actor to the given graphics context.
Note: this function could be simplified if the graphics context would support setting a translation offset. It already does this partly with the clipping rectangle support.
Implemented in ActorSprite, FloorItem, ImageParticle, Particle, and TextParticle.
◆ drawnWhenBehind()
virtual bool Actor::drawnWhenBehind |
( |
| ) |
const |
|
inlinevirtual |
Determines wether the actor should be drawn translucent when behind another object.
Reimplemented in Being, Particle, and TextParticle.
Definition at line 84 of file actor.h.
◆ getAlpha()
virtual float Actor::getAlpha |
( |
| ) |
const |
|
pure virtual |
Returns the current alpha value used to draw the actor.
Implemented in ActorSprite, and Particle.
◆ getDrawOrder()
virtual int Actor::getDrawOrder |
( |
| ) |
const |
|
inlinevirtual |
◆ getMap()
Map * Actor::getMap |
( |
| ) |
const |
|
inline |
◆ getPixelX()
int Actor::getPixelX |
( |
| ) |
const |
|
inline |
Returns the pixels X coordinate of the actor.
Definition at line 65 of file actor.h.
◆ getPixelY()
int Actor::getPixelY |
( |
| ) |
const |
|
inline |
Returns the pixel Y coordinate of the actor.
Definition at line 71 of file actor.h.
◆ getPosition()
const Vector & Actor::getPosition |
( |
| ) |
const |
|
inline |
Returns the pixel position of this actor.
Definition at line 53 of file actor.h.
◆ getTileX()
int Actor::getTileX |
( |
| ) |
const |
|
virtual |
Returns the x coordinate in tiles of the actor.
Reimplemented in Being, and FloorItem.
Definition at line 45 of file actor.cpp.
◆ getTileY()
int Actor::getTileY |
( |
| ) |
const |
|
virtual |
Returns the y coordinate in tiles of the actor.
Reimplemented in Being, and FloorItem.
Definition at line 50 of file actor.cpp.
◆ setAlpha()
virtual void Actor::setAlpha |
( |
float |
alpha | ) |
|
|
pure virtual |
◆ setMap()
void Actor::setMap |
( |
Map * |
map | ) |
|
|
virtual |
◆ setPosition()
virtual void Actor::setPosition |
( |
const Vector & |
pos | ) |
|
|
inlinevirtual |
Sets the pixel position of this actor.
Reimplemented in Being.
Definition at line 59 of file actor.h.
◆ mMap
Map* Actor::mMap = nullptr |
|
protected |
◆ mMapActor
Actors::iterator Actor::mMapActor |
|
private |
◆ mPos
The documentation for this class was generated from the following files: