|
| | UnitTower (sf::Vector2f const &position, tinyxml2::XMLElement *xmlDef) |
| | Constructs a unit-producing tower. More...
|
| |
|
void | update (sf::Time const &elapsedTime) override |
| | Spawns a unit if enough time has passed.
|
| |
|
bool | shoot (std::shared_ptr< std::list< std::shared_ptr< Pawn >>> const &targetList) override |
| |
|
void | setPath (std::shared_ptr< Path > const &path) |
| |
|
void | setSpawnCallback (std::function< void(std::shared_ptr< Minion >)> const &callback) |
| |
|
| Tower (sf::Vector2f const &position, tinyxml2::XMLElement *xmlDef) |
| |
|
virtual int | getCost () const |
| |
| | Actor (sf::Texture &texture, sf::Shape *collisionMask, sf::Vector2f const &maskOffset) |
| |
|
| Actor (tinyxml2::XMLElement *xml) |
| |
|
void | animate (sf::Time const &elapsedTime) |
| | Updates the animator and applies it to ourself.
|
| |
|
bool | isPlayingAnimation () const |
| | Returns true if an animation is currently playing.
|
| |
|
std::string | getPlayingAnimation () const |
| | Gets the name of the playing animation. Undefined behaviour if no animation playing.
|
| |
|
void | playAnimation (std::string const &name, bool loop=false) |
| | Begins playing an animation by name.
|
| |
|
void | setVisible (bool isVisible=true) |
| |
|
bool | toggleVisible () |
| |
|
bool | getVisible () const |
| |
|
virtual void | draw (sf::RenderTarget &target) const |
| |
|
| Collidable (sf::Shape *mask, sf::Vector2f offset) |
| |
|
| Collidable (Collidable const &other) |
| |
| | Collidable (tinyxml2::XMLElement *xml) |
| | Constructs a Collidable from an xml tag. Tag requires pointCoint and type attributes in addition to child tags depending on type specified. More...
|
| |
|
const sf::Shape * | getMask () const |
| |
|
void | setMask (sf::Shape *mask, sf::Vector2f offset) |
| |
|
virtual void | onCollide (std::shared_ptr< Collidable > &other, sf::Vector2f const &mtv) |
| | Called when we collide with something.
|
| |
|
void | setDebugColour (sf::Color const &c) |
| |
|
void | debug_draw (sf::RenderTarget &target) |
| |
| void | getAxies (std::vector< sf::Vector2f > &axiesVector) |
| | Gets all axies of the mask. Gets all axies of the mask. Currently inefficient due to the fact that it iterates over all points and returns all axies (a duplicate of each axis is included!). More...
|
| |
|
size_t | getPointCount () const |
| | Gets the number of points in the mask. Calls mask->getPoint() and returns the result.
|
| |
| sf::Vector2f | projectOntoAxis (sf::Vector2f &axis) const |
| | Projects the mask onto an axis. Projects each point of the mask onto an axis and returns the min and max points it covers on that axis. More...
|
| |
Tower that produces Minions and sends them to the nearest path node. Uses an xml Minion definition to create units.