예제 #1
0
/**
 * @brief Starts a transition effect on this object.
 *
 * The transition will be automatically deleted when finished or stopped.
 * Any previous transition is stopped.
 *
 * @param transition The transition to start.
 * @param callback_ref A Lua registry ref to the function to call when
 * the transition finishes, or LUA_REFNIL.
 * @param lua_context The Lua world for the callback (or NULL).
 */
void Drawable::start_transition(Transition& transition,
    int callback_ref, LuaContext* lua_context) {

  stop_transition();

  this->transition = &transition;
  this->transition_callback_ref = callback_ref;
  this->lua_context = lua_context;
  transition.start();
}
예제 #2
0
/**
 * \brief Destructor.
 */
Drawable::~Drawable() {

  stop_transition();
  stop_movement();
}