Click or drag to resize
SpriteBaseReactToPushback Method
Alter the velocity of this sprite to plan to move out of the way of sprites in Pushers but if this sprite is planning to overlap a sprite in Pushers, only after those sprites have processed their rules (usually to react to this sprite's pushing first).

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual bool ReactToPushback(
	SpriteCollection Pushers
)

Parameters

Pushers
Type: (Default Namespace)SpriteCollection
Sprites that can push back on this sprite.

Return Value

Type: Boolean
True if the sprite was pushed, false otherwise.
Remarks
The process of making moving sprites push and avoid each other is relatively complex and not 100% reliable. If only one of the sprites is moving, it's recommended to use the simpler ReactToPush(SpriteCollection) function on the moving sprite instead. This function is designed to be used on sprites that can both move and push other sprites, and the other sprites need to push back if they cannot move any farther.
See Also