Go to the documentation of this file.
35 int xPattern = 0, yPattern = 0;
65 const float fraction = m_animationTimer.
ticksElapsed() / m_duration;
66 rawGetThingType()->
draw(dest + m_delta * fraction * scaleFactor, scaleFactor, 0, xPattern, yPattern, 0, 0, redrawFlag, lightView);
72 m_delta =
Point(toPosition.
x - fromPosition.
x, toPosition.
y - fromPosition.
y);
74 const float deltaLength = m_delta.
length();
75 if(deltaLength == 0) {
ThingType * rawGetThingType(uint16 id, ThingCategory category)
void startListenerPainter(const float duration)
@ MISSILE_TICKS_PER_FRAME
EventDispatcher g_dispatcher
ThingType * rawGetThingType() override
const ThingTypePtr & getThingType() override
void setId(uint32 id) override
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 redrawFlag, LightView *lightView=nullptr)
void draw(const Point &dest, float scaleFactor, int layer, int xPattern, int yPattern, int zPattern, int animationPhase, int reDrawFlags=Otc::ReDrawThing, 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)