Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ime::RandomGridMover Class Reference

Moves a GridObject randomly in a Grid2D. More...

#include <RandomGridMover.h>

Inheritance diagram for ime::RandomGridMover:
ime::GridMover ime::Object

Public Types

using Ptr = std::unique_ptr< RandomGridMover >
 Unique grid mover pointer. More...
 
enum class  Type {
  Manual , Random , Target , Cyclic ,
  KeyboardControlled , Custom
}
 Types of grid movers. More...
 
enum class  MoveRestriction {
  None , All , Vertical , Horizontal ,
  Diagonal , NonDiagonal
}
 Restricts the movement of the target along axes. More...
 

Public Member Functions

 RandomGridMover (Grid2D &grid, GridObject *target=nullptr)
 Constructor. More...
 
std::string getClassName () const override
 Get the name of this class. More...
 
void startMovement ()
 Start moving the target in the grid. More...
 
void stopMovement ()
 Stop moving the target in the grid. More...
 
 ~RandomGridMover () override
 Destructor. More...
 
std::string getClassType () const override
 Get the name of this class. More...
 
void syncWith (const GridMover &other)
 Sync this grid mover with another grid mover. More...
 
bool requestMove (const Direction &dir)
 Request a move in a given direction. More...
 
std::pair< bool, GridObject * > isBlockedInDirection (const Direction &direction) const
 Check if the target is blocked from moving in a direction. More...
 
Direction getDirection () const
 Get the current direction of the game object. More...
 
Direction getPrevDirection () const
 Get the previous direction of the target. More...
 
void setTarget (GridObject *target)
 Change the controlled entity. More...
 
GridObjectgetTarget () const
 Get access to the controlled entity. More...
 
void setSpeed (const Vector2f &speed)
 Set the speed of the game object. More...
 
const Vector2fgetSpeed () const
 Get the speed of the target. More...
 
void setSpeedMultiplier (float multiplier)
 Set a speed multiplier. More...
 
float getSpeedMultiplier () const
 Get the speed multiplier. More...
 
void setMovementRestriction (MoveRestriction moveRestriction)
 Restrict the movement of the game object to certain directions. More...
 
MoveRestriction getMovementRestriction () const
 Get the current movement restriction of the game object. More...
 
void setMovementFreeze (bool freeze)
 Freeze or unfreeze the targets movement. More...
 
bool isMovementFrozen () const
 Check if the targets movement is frozen or not. More...
 
Index getCurrentTileIndex () const
 Get the index of the tile currently occupied by the target. More...
 
Index getPrevTileIndex () const
 Get the index of the tile previously occupied by the target. More...
 
Type getType () const
 Get the type of the grid mover. More...
 
Grid2DgetGrid ()
 Get access to the grid in which the target is moved in. More...
 
const Grid2DgetGrid () const
 
bool isTargetMoving () const
 Check if target is moving or not. More...
 
void teleportTargetToDestination ()
 Force the target to reach it's destination. More...
 
int onDirectionChange (const Callback< Direction > &callback, bool oneTime=false)
 Add an event listener to a target direction change. More...
 
void resetTargetTile ()
 Reset the target tile to be the same as the entity tile. More...
 
int onTargetTileReset (const Callback< Index > &callback, bool oneTime=false)
 Add an event listener to target tile reset event. More...
 
virtual void update (Time deltaTime)
 
int onMoveBegin (const Callback< Index > &callback, bool oneTime=false)
 Add an event listener to a move begin event. More...
 
int onMoveEnd (const Callback< Index > &callback, bool oneTime=false)
 Add an event listener to an adjacent tile reached event. More...
 
int onObjectCollision (const Callback< GridObject *, GridObject * > &callback, bool oneTime=false)
 Add an event listener to a grid collision event event. More...
 
int onBorderCollision (const Callback<> &callback, bool oneTime=false)
 Add an event listener to a grid border collision event. More...
 
int onTileCollision (const Callback< Index > &callback, bool oneTime=false)
 Add an event listener to a tile collision event. More...
 
void setTag (const std::string &tag)
 Assign the object an alias. More...
 
const std::string & getTag () const
 Get the tag assigned to the object. More...
 
unsigned int getObjectId () const
 Get the unique id of the object. More...
 
int onPropertyChange (const std::string &property, const Callback< Property > &callback, bool oneTime=false)
 Add an event listener to a specific property change event. More...
 
int onPropertyChange (const Callback< Property > &callback, bool oneTime=false)
 Add an event listener to any property change event. More...
 
void suspendedEventListener (int id, bool suspend)
 Pause or resume execution of an event listener. More...
 
bool isEventListenerSuspended (int id) const
 Check if an event listener is suspended or not. More...
 
bool removeEventListener (const std::string &event, int id)
 Remove an event listener from an event. More...
 
bool removeEventListener (int id)
 Remove an event listener. More...
 
int onDestruction (const Callback<> &callback)
 Add a destruction listener. More...
 
bool isSameObjectAs (const Object &other) const
 Check if another object is the same instance as this object. More...
 

Static Public Member Functions

static RandomGridMover::Ptr create (Grid2D &grid, GridObject *target=nullptr)
 Create a RandomGridMover. More...
 

Protected Member Functions

void emitChange (const Property &property)
 Dispatch a property change event. More...
 
void emitDestruction ()
 Emit a destruction event. More...
 

Protected Attributes

EventEmitter eventEmitter_
 Event dispatcher. More...
 

Detailed Description

Moves a GridObject randomly in a Grid2D.

Note that the target cannot move backwards because it may be stuck in a loop where it switches between the same two tiles. The only time it reverses direction is when attempting to get out of a ead-end.

Definition at line 40 of file RandomGridMover.h.

Member Typedef Documentation

◆ Ptr

using ime::RandomGridMover::Ptr = std::unique_ptr<RandomGridMover>

Unique grid mover pointer.

Definition at line 42 of file RandomGridMover.h.

Member Enumeration Documentation

◆ MoveRestriction

enum class ime::GridMover::MoveRestriction
stronginherited

Restricts the movement of the target along axes.

Enumerator
None 

Target can move in all in all 8 directions (W, NW, N, NE, E, SE, S, SW)

All 

Target cannot move in any direction.

Vertical 

Target can only move vertically (N or S)

Horizontal 

Target can only move horizontally (W or E)

Diagonal 

Target can only move diagonally (NW, NE, SE, SW)

NonDiagonal 

Target can only move non-diagonally (W, N, E, S)

Definition at line 75 of file GridMover.h.

◆ Type

enum class ime::GridMover::Type
stronginherited

Types of grid movers.

Enumerator
Manual 

Manually triggered grid mover.

Random 

Moves a game object randomly in the grid.

Target 

Moves a game object to a specific tile within the grid.

Cyclic 

Moves a game object by following a closed path.

KeyboardControlled 

Moves a game object within the grid using the keyboard as a trigger.

Custom 

For classes that extend the grid mover outside of IME.

Definition at line 63 of file GridMover.h.

Constructor & Destructor Documentation

◆ RandomGridMover()

ime::RandomGridMover::RandomGridMover ( Grid2D grid,
GridObject target = nullptr 
)
explicit

Constructor.

Parameters
gridGrid to move target in
targetGame object to be moved in the grid
Warning
If target is left as nullptr, then setTarget() must be called before the grid mover is used. If the target is given, it must be in the grid prior to constructor call and it must not have a RigidBody attached to it, otherwise undefined behavior
See also
setTarget

◆ ~RandomGridMover()

ime::RandomGridMover::~RandomGridMover ( )
override

Destructor.

Member Function Documentation

◆ create()

static RandomGridMover::Ptr ime::RandomGridMover::create ( Grid2D grid,
GridObject target = nullptr 
)
static

Create a RandomGridMover.

Parameters
gridThe grid to move the target in
targetGame object to be moved in the grid
Returns
The created grid mover
Warning
If target is left as nullptr, then setTarget() must be called before the grid mover is used. If the target is given, it must be in the grid prior to constructor call and it must not have a RigidBody attached to it, otherwise undefined behavior
See also
setTarget

◆ emitChange()

void ime::Object::emitChange ( const Property property)
protectedinherited

Dispatch a property change event.

Parameters
propertyThe property that changed

This function will invoke all the event listeners of the specified property

See also
emit

◆ emitDestruction()

void ime::Object::emitDestruction ( )
protectedinherited

Emit a destruction event.

Note
This function must be the first statement in the definition of a destructor to avoid undefined behavior. In addition, note that destruction listeners are invoked once. Therefore, multiple classes in a hierarchy may call this function but the class that makes the call first will be the one that invokes the destruction listeners

◆ getClassName()

std::string ime::RandomGridMover::getClassName ( ) const
overridevirtual

Get the name of this class.

Returns
The name of this class

Reimplemented from ime::GridMover.

◆ getClassType()

std::string ime::GridMover::getClassType ( ) const
overridevirtualinherited

Get the name of this class.

Returns
The name of this class

Note that this function is only implemented by child classes of Object which also serve as a base class for other classes

See also
Object::getClassType and Object::getClassName

Reimplemented from ime::Object.

◆ getCurrentTileIndex()

Index ime::GridMover::getCurrentTileIndex ( ) const
inherited

Get the index of the tile currently occupied by the target.

Returns
The position of the tile currently occupied by the target in tiles

Recall that when moved, the target occupies a tile ahead of time (see requestMove())

See also
getPrevTileIndex

◆ getDirection()

Direction ime::GridMover::getDirection ( ) const
inherited

Get the current direction of the game object.

Returns
The current direction of the game object

◆ getGrid()

Grid2D & ime::GridMover::getGrid ( )
inherited

Get access to the grid in which the target is moved in.

Returns
The grid in which the target is being moved in

◆ getMovementRestriction()

MoveRestriction ime::GridMover::getMovementRestriction ( ) const
inherited

Get the current movement restriction of the game object.

Returns
The current movement restriction

◆ getObjectId()

unsigned int ime::Object::getObjectId ( ) const
inherited

Get the unique id of the object.

Returns
The unique id of the object

Note that each instance of ime::Object has a unique id

See also
setTag

◆ getPrevDirection()

Direction ime::GridMover::getPrevDirection ( ) const
inherited

Get the previous direction of the target.

Returns
The previous direction of the target

◆ getPrevTileIndex()

Index ime::GridMover::getPrevTileIndex ( ) const
inherited

Get the index of the tile previously occupied by the target.

Returns
The tile the target was on before moving to another tile

If the target never moved, then this function will return the tile currently occupied by the target

See also
getCurrentTileIndex

◆ getSpeed()

const Vector2f & ime::GridMover::getSpeed ( ) const
inherited

Get the speed of the target.

Returns
The speed of the target
See also
setSpeed

◆ getSpeedMultiplier()

float ime::GridMover::getSpeedMultiplier ( ) const
inherited

Get the speed multiplier.

Returns
The speed multiplier
See also
setSpeedMultiplier

◆ getTag()

const std::string & ime::Object::getTag ( ) const
inherited

Get the tag assigned to the object.

Returns
The tag of the object
See also
setTag

◆ getTarget()

GridObject * ime::GridMover::getTarget ( ) const
inherited

Get access to the controlled entity.

Returns
The controlled entity, or a nullptr if there is no entity to control

◆ getType()

Type ime::GridMover::getType ( ) const
inherited

Get the type of the grid mover.

Returns
The type of the grid mover

◆ isBlockedInDirection()

std::pair< bool, GridObject * > ime::GridMover::isBlockedInDirection ( const Direction direction) const
inherited

Check if the target is blocked from moving in a direction.

Parameters
directionThe direction to be checked
Returns
A pair, of which the first element is a bool that is true if the target is blocked or false if the target is not blocked and the second element is a pointer to an obstacle game object that is a nullptr when the first element is false or when the first element is true but the target is not blocked by a game object

This function will return true if the target is blocked by a collidable tile or an obstacle (see ime::GridObject::setObstacle), or if a move in the given direction will place it outside the bounds of the grid

◆ isEventListenerSuspended()

bool ime::Object::isEventListenerSuspended ( int  id) const
inherited

Check if an event listener is suspended or not.

Parameters
idThe identification number of the listener to be checked
Returns
True if suspended, otherwise false

This function also returns false if the specified event listener does not exist

See also
suspendedEventListener

◆ isMovementFrozen()

bool ime::GridMover::isMovementFrozen ( ) const
inherited

Check if the targets movement is frozen or not.

Returns
True if movement is frozen otherwise false
See also
setMovementFreeze

◆ isSameObjectAs()

bool ime::Object::isSameObjectAs ( const Object other) const
inherited

Check if another object is the same instance as this object.

Parameters
otherThe object to compare against this object
Returns
True if other is the same instance as this object, otherwise false

◆ isTargetMoving()

bool ime::GridMover::isTargetMoving ( ) const
inherited

Check if target is moving or not.

Returns
True if target is moving otherwise false
Warning
This function will return false if the target is not moving or there is no target set. Therefore, the existence of the target should be checked first for accurate results
See also
getTarget

◆ onBorderCollision()

int ime::GridMover::onBorderCollision ( const Callback<> &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to a grid border collision event.

Parameters
callbackFunction to execute when the collision takes place
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners identification number

This event is emitted when the target tries to go beyond the bounds of the grid. By default the event is handled internally before it's emitted to the outside. The internal handler prevents the target from leaving the grid. That is, the target will occupy the same tile it occupied before the collision. This behaviour is not removable, however, it may be overridden since the internal handler is called first before alerting external handlers

See also
unsubscribe

◆ onDestruction()

int ime::Object::onDestruction ( const Callback<> &  callback)
inherited

Add a destruction listener.

Parameters
callbackFunction to be executed when the object is destroyed
Returns
The unique id of the destruction listener

The destruction listener is called when the object reaches the end of its lifetime. Note that an object may have multiple destruction listeners registered to it

Warning
It's not advised to call virtual functions in the destruction callback as some parts of the object may have already been destroyed by the time the callback is invoked. In such an event, the behavior is undefined
See also
removeEventListener

◆ onDirectionChange()

int ime::GridMover::onDirectionChange ( const Callback< Direction > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to a target direction change.

Parameters
callbackThe function to be executed when target direction changes
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners unique identifier

The direction change event is triggered by a move request

See also
requestMove

◆ onMoveBegin()

int ime::GridMover::onMoveBegin ( const Callback< Index > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to a move begin event.

Parameters
callbackThe function to be executed when the game object starts moving
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners unique identification number

This event is emitted when the game object starts moving from its current tile to one of its adjacent tile. The callback is passed the index of the tile that the game object is currently moving to

Note
When controlled by a grid mover, the game object will always move one tile at a time, regardless of how fast it's moving
See also
onAdjacentMoveEnd

◆ onMoveEnd()

int ime::GridMover::onMoveEnd ( const Callback< Index > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to an adjacent tile reached event.

Parameters
callbackFunction to execute when the target reaches its target tile
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners identification number

This event is emitted when the target moves from its current tile to any of its adjacent tiles.

Note
When controlled by a grid mover, the target will always move one tile at a time, regardless of how fast the target is moving

The callback is passed the index of the tile the target moved to

See also
onAdjacentMoveBegin

◆ onObjectCollision()

int ime::GridMover::onObjectCollision ( const Callback< GridObject *, GridObject * > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to a grid collision event event.

Parameters
callbackThe function to be executed when the target collides with another game object
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners unique identification number

◆ onPropertyChange() [1/2]

int ime::Object::onPropertyChange ( const Callback< Property > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to any property change event.

Parameters
callbackThe function to be executed when any property changes
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The unique id of the event listener

When unsubscribing the any property change event handler, you must pass "propertyChange" as the name of the event

See also
onPropertyChange(const std::string&, const ime::Callback<ime::Property>&)

◆ onPropertyChange() [2/2]

int ime::Object::onPropertyChange ( const std::string &  property,
const Callback< Property > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to a specific property change event.

Parameters
propertyThe name of the property to add an event listener to
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
callbackThe function to be executed when the property changes
Returns
The unique id of the event listener

A property change event is triggered by any function that begins with set, where the the text after set is the name of the property. For example, the setTag() function, modifies the tag property of the object, thus will generate a "tag" change event each time it is called

Note that multiple event listeners may be registered to the same property change event. In addition, when adding a property change event listener, the name of the property must be in lowercase.

// Prints the tag of the player object to the console everytime it changes
player.onPropertyChange("tag", [](const Property& property) {
cout << "New tag: " << property.getValue<std::string>() << endl;
});
...
//Sets tag = "player1" and invokes event listener(s)
player.setTag("player1");
See also
unsubscribe and onPropertyChange(const ime::Callback<ime::Property>&)

◆ onTargetTileReset()

int ime::GridMover::onTargetTileReset ( const Callback< Index > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to target tile reset event.

Parameters
callbackFunction to execute when the target tile is reset
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners identification number
See also
resetTargetTile and unsubscribe

◆ onTileCollision()

int ime::GridMover::onTileCollision ( const Callback< Index > &  callback,
bool  oneTime = false 
)
inherited

Add an event listener to a tile collision event.

Parameters
callbackFunction to execute when the collision takes place
oneTimeTrue to execute the callback one-time or false to execute it every time the event is triggered
Returns
The event listeners identification number

This event is emitted when the target collides with a solid tile in the grid (Solid tiles are always collidable). By default, the event is handled internally before its emitted to the outside. The internal handler prevents the target from occupying the solid tile by moving it back to its previous tile after the collision

The callback is passed the index of the tile the target collided with

See also
unsubscribe

◆ removeEventListener() [1/2]

bool ime::Object::removeEventListener ( const std::string &  event,
int  id 
)
inherited

Remove an event listener from an event.

Parameters
eventThe name of the event to remove an event listener from
idThe unique id of the event listener to be removed
Returns
True if the event listener was removed or false if the event or the event listener is does not exist
// Display the tag of the object to console every time it changes
auto tagChangeId = object.onPropertyChange("tag", [](ime::Property tag) {
std::cout << name.getValue<std::string>() << std::endl;
});
// Stop displaying the tag of the object when it changes
object.removeEventListener("tag", tagChangeId);
Class that can store a value of any type.
Definition: Property.h:38

◆ removeEventListener() [2/2]

bool ime::Object::removeEventListener ( int  id)
inherited

Remove an event listener.

Parameters
idThe id of the event listener to be removed
Returns
True if the event listener was removed or false if no such handler exists

◆ requestMove()

bool ime::GridMover::requestMove ( const Direction dir)
inherited

Request a move in a given direction.

Parameters
dirThe direction to move in
Returns
True if the move was granted or false if the target is currently moving to another tile

The target can only move one tile at a time, as a result it cannot be requested to move to a tile while it is currently moving towards another tile (see isTargetMoving()). In addition, If a move in the specified direction is possible, the adjacent tile in the specified direction will be flagged as occupied by the target before it moves to it

◆ resetTargetTile()

void ime::GridMover::resetTargetTile ( )
inherited

Reset the target tile to be the same as the entity tile.

Note
This function must be called every time the target is manually moved in the grid so that the grid mover can register the new position of the target. If not called, the GridMover will lose control of the target and the targets movement behavior is undefined in such a case. In addition, note that the target tile can only be reset when the target is not moving. Here's an example:
// Let the grid mover be responsible for moving the player object
grid.addChild(player, ime::Index{4, 5});
gridMover.setTarget(player);
...
// Manually move the player to some desired position
if (!gridMover.isTargetMoving) {
gridMover.getGrid().removeChild(player);
gridMover.getGrid().addChild(player, ime::Index{11, 20});
// Let the grid mover know that the player is no longer where it
// was registered to be (The grid mover will update itself accordingly)
gridMover.resetTargetTile();
}
Represents a position Grid2D Tile.
Definition: Index.h:35

◆ setMovementFreeze()

void ime::GridMover::setMovementFreeze ( bool  freeze)
inherited

Freeze or unfreeze the targets movement.

Parameters
freezeTrue to freeze movement or false to unfreeze

This function achieves the same thing as setMovementRestriction(). The difference is when the function is called while the target is moving. setMovementRestriction(true) will prevent the target from moving further after the targets gets to its targeted tile whilst setMovementFreeze(true) will immediately prevent the target from moving further. This means that the target can temporarily be in between grid tiles

By default, the targets movement is not frozen

See also
setMovementRestriction

◆ setMovementRestriction()

void ime::GridMover::setMovementRestriction ( MoveRestriction  moveRestriction)
inherited

Restrict the movement of the game object to certain directions.

Parameters
moveRestrictionPermitted direction of travel

By default the movement restrictions is MovementRestriction::None

See also
setMovementFreeze

◆ setSpeed()

void ime::GridMover::setSpeed ( const Vector2f speed)
inherited

Set the speed of the game object.

Parameters
speedThe new speed

If the game object is currently moving, the speed will be set after it reaches its current target tile

Note that for a ime::MoveRestriction::Diagonal or ime::MoveRestriction::None, the speed must be the same for both the x and y axis, otherwise undefined behaviour

By default, the speed is ime::Vector2f{60, 60}

See also
getSpeed

◆ setSpeedMultiplier()

void ime::GridMover::setSpeedMultiplier ( float  multiplier)
inherited

Set a speed multiplier.

Parameters
multiplierThe new speed multiplier

A speed multiplier increases or decreases the speed of the target without affecting its default speed. For example, A multiplier of 2.0f makes the target move twice as fast, a multiplier of 0.5f makes the target move at half its normal speed and a multiplier of 0.0f stops the target from moving. Note that a negative multiplier will be ignored

By default, the multiplier is 1.0f (normal)

See also
getSpeedMultiplier

◆ setTag()

void ime::Object::setTag ( const std::string &  tag)
inherited

Assign the object an alias.

Parameters
tagThe alias of the object

This function is useful if you want to refer to the object by a tag instead of its object id. Unlike an object id, multiple objects may have the same tag

By default, the tag is an empty string

See also
getObjectId

◆ setTarget()

void ime::GridMover::setTarget ( GridObject target)
inherited

Change the controlled entity.

Parameters
targetNew target

Provide nullptr as argument to remove current target

Warning
if the target is not a nullptr, then it must exist in the Grid2D and must not have a RigidBody attached to it, otherwise undefined behavior

◆ startMovement()

void ime::RandomGridMover::startMovement ( )

Start moving the target in the grid.

This function will move the target if it hasn't been moved for the first time or the movement was stopped

See also
stopMovement

◆ stopMovement()

void ime::RandomGridMover::stopMovement ( )

Stop moving the target in the grid.

Since a child in the grid can never be in between tiles, the targets movement will be stopped after it completes its current move. The targets movement is stopped by default

See also
startMovement

◆ suspendedEventListener()

void ime::Object::suspendedEventListener ( int  id,
bool  suspend 
)
inherited

Pause or resume execution of an event listener.

Parameters
idThe event listeners unique identification number
suspendTrue to suspend/pause or false to unsuspend/resume
See also
isEventListenerSuspended

◆ syncWith()

void ime::GridMover::syncWith ( const GridMover other)
inherited

Sync this grid mover with another grid mover.

Parameters
otherThe grid mover to sync with this grid mover with

In situations where you want to change a targets grid mover, you'll have to synchronize the new grid mover with the current grid mover to avoid misalignment with the grid. When misaligned, the target is no longer confined to the grid and moves indefinitely in its current direction. Note that misalignment does not occur when the target is not moving, i.e when isMoving() returns false.

// Lets assume a player target was being moved by a ime::RandomGridMover
// and now we want it to be moved by a ime::CyclicGridMover
cyclicGridMover.sync(randomGridMover);
cyclicGridMover.setTarget(randomGridMover.getTarget());
randomGridMover.setTarget(nullptr);
cyclicGridMover.startMovement();

◆ teleportTargetToDestination()

void ime::GridMover::teleportTargetToDestination ( )
inherited

Force the target to reach it's destination.

The destination in this context is always the adjacent tile the target is headed towards. This function has no effect if the target is not moving towards any tile

Member Data Documentation

◆ eventEmitter_

EventEmitter ime::Object::eventEmitter_
protectedinherited

Event dispatcher.

Definition at line 289 of file Object.h.


The documentation for this class was generated from the following file: