PlanBaseMapMouseToSprite Method |
Move the specified sprite to the position of the mouse cursor and set the sprite's button inputs based on mouse button states.
Namespace: (Default Namespace)Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax public virtual void MapMouseToSprite(
SpriteBase Target,
bool InstantMove,
RelativePosition hotSpot
)
Parameters
- Target
- Type: (Default Namespace)SpriteBase
Specifies the sprite to be moved. - InstantMove
- Type: SystemBoolean
If true, the sprite will be moved immediately without regard to
the existing position or solidity or anything else. If false, the sprite's position will
not be immediately changed, but its velocity will be set so that the sprite will end up at
the mouse cursor's location after MoveByVelocity executes. Note that moving
the sprite instantly will ignore solidity and will not work well with sprites riding on
this sprite, while allowing just the velocity to be set will allow this, but limit the
sprite's movement based on solidity. - hotSpot
- Type: (Default Namespace)RelativePosition
Which part of the sprite will move to the mouse point.
Remarks Before the button inputs are mapped from the mouse to the sprite,
the existing inputs are copied from
inputs to
oldinputs
so other rules will be able to determine which buttons were pressed before.
See Also