.animate helper: create and start an animation directly on a target. Preferred use pattern; closes #175
This commit is contained in:
parent
d878c8684d
commit
9ab618079a
21 changed files with 738 additions and 11 deletions
|
|
@ -78,7 +78,12 @@ public:
|
|||
bool setProperty(const std::string& name, float value);
|
||||
bool setProperty(const std::string& name, int value);
|
||||
bool getProperty(const std::string& name, float& value) const;
|
||||
|
||||
bool hasProperty(const std::string& name) const;
|
||||
|
||||
// Animation shorthand helper - creates and starts an animation on this entity
|
||||
// Returns a PyAnimation object. Used by the .animate() method.
|
||||
static PyObject* animate(PyUIEntityObject* self, PyObject* args, PyObject* kwds);
|
||||
|
||||
// Methods that delegate to sprite
|
||||
sf::FloatRect get_bounds() const { return sprite.get_bounds(); }
|
||||
void move(float dx, float dy) { sprite.move(dx, dy); position.x += dx; position.y += dy; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue