Click or drag to resize
SpriteMoveTo Method
Overload List
  NameDescription
Public methodMoveTo(ListPoint)
Tell the sprite to move towards each point in turn. The sprite will move in a straight line until the first point. From there it moves to the next point, until it has reached the last point. Every time it reaches a point, the SpriteArrivedAtWaypoint event is triggered. When it reaches the final point in the list, the SpriteArrivedAtEndPoint event is triggered. While the sprite is moving, the SpriteReachedEndPoint attribute is set to false. When it has arrived, it is set to true.
Public methodMoveTo(Point)
Tell the Sprite to move towards a destination. You need to give the sprite a MovementSpeed and tell the sprite that it can automatically move. But the sprite will begin a journey towards that point at the MovementSpeed you have set. When it gets to the point, the SpriteArrivedAtEndPoint event will fire off. Also, the SpriteReachedEnd bool will be true.
Public methodMoveTo(Sprite)
Move to where the destination sprite currently is at. This is a dumb move. It does not take into consideration the movement direction of the destination sprite. So the moving sprite does need to be moving a bit faster than the sprite you are trying to hit for it to do so.
Top
See Also