Go to the documentation of this file.
32 if(m_id == 0 || !animate)
35 int xPattern = 0, yPattern = 0;
65 float fraction = m_animationTimer.
ticksElapsed() / m_duration;
66 rawGetThingType()->
draw(dest + m_delta * fraction * scaleFactor, scaleFactor, 0, xPattern, yPattern, 0, 0, lightView);
74 m_delta =
Point(toPosition.
x - fromPosition.
x, toPosition.
y - fromPosition.
y);
75 m_duration = 150 * std::sqrt(m_delta.
length());
ThingType * rawGetThingType(uint16 id, ThingCategory category)
void draw(const Point &dest, float scaleFactor, bool animate, LightView *lightView=nullptr)
ThingType * rawGetThingType()
EventDispatcher g_dispatcher
const ThingTypePtr & getThingType()
const ThingTypePtr & getThingType(uint16 id, ThingCategory category)
Otc::Direction getDirectionFromPosition(const Position &position) const
void setPath(const Position &fromPosition, const Position &toPosition)
void draw(const Point &dest, float scaleFactor, int layer, int xPattern, int yPattern, int zPattern, int animationPhase, LightView *lightView=nullptr)
ScheduledEventPtr scheduleEvent(const std::function< void()> &callback, int delay)
ThingTypeManager g_things
bool removeThing(const ThingPtr &thing)
bool isValidDatId(uint16 id, ThingCategory category)