Click or drag to resize
PlanBaseMatchSpritePosition Method
Set the position of the target sprite to match that of the source sprite.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void MatchSpritePosition(
	SpriteBase Target,
	SpriteBase Source
)

Parameters

Target
Type: (Default Namespace)SpriteBase
Specifies the sprite whose position will change.
Source
Type: (Default Namespace)SpriteBase
Specifies the sprite whose position is copied.
Remarks
This very simply copies the position from the source sprite to that of the target sprite. No tests are performed for solidity and no velocity is changed. The old position of the target sprite, however, is tracked, so it's still possible to determine if the sprite was touching a tile or plan before it moved with a function like WasSpriteTouching(SpriteBase).
See Also