Click or drag to resize
PlanBasePushSpriteIntoView Method
Alter a sprite's velocity so that it remains within the map's visible area.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void PushSpriteIntoView(
	SpriteBase Sprite,
	bool StayInScrollMargins
)

Parameters

Sprite
Type: (Default Namespace)SpriteBase
Sprite that should be pushed
StayInScrollMargins
Type: SystemBoolean
True to push the sprite until it is within the scroll margins of the map or false to push it only until it is fully visible.
Remarks
This can be useful in multi-player games to not only ensure that the view remains focused on a particular sprite, but also to ensure that another sprite (another player) can't leave the view (in cases where both players are shown in the same view).
See Also