SpriteAutomaticallyMoves Property |
Determine if the sprite automatically moves (you need to give it a direction [using one of the
SetSpriteDirection functions] and speed [MovementSpeed = X] also)
Namespace:
SpriteLibrary
Assembly:
SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntaxpublic bool AutomaticallyMoves { get; set; }
Property Value
Type:
Boolean
Examples
Here is a short bit of code, showing how AutomaticallyMoves is part of the bigger picture. You
need to set the direction (or use a
MoveTo(ListPoint) function), as well
as setting the speed.
Sprite NewSprite = MySpriteController.DuplicateSprite("Dragon");
NewSprite.AutomaticallyMoves = true;
NewSprite.CannotMoveOutsideBox = true;
NewSprite.SpriteHitsPictureBox += SpriteBounces;
NewSprite.SetSpriteDirectionDegrees(90);
NewSprite.PutBaseImageLocation(new Point(startx, starty));
NewSprite.MovementSpeed = speed;
See Also