SpriteBase Methods |
The SpriteBase type exposes the following members.
Name | Description | |
---|---|---|
AccelerateByInputs |
Accelerate this sprite according to which directional inputs are on/pressed.
| |
AddSpriteHere |
Create a new (dynamic) instance of the specified sprite positioned such that HotSpot on the created sprite overlaps Location on this sprite.
| |
AlterXVelocity |
Increment or decrement horizontal velocity
| |
AlterYVelocity |
Increment or decrement vertical velocity
| |
Animate |
Advance the animation frame of this sprite according to its velocity or a constant rate.
| |
ApplyLights |
Use properties of the sprites in the specified category to configure real-time lighting on the display
for the current frame.
(Inherited from GeneralRules.) | |
Blocked |
Determines if the sprite is blocked from moving freely in a particular direction by solidity on the layer.
| |
CalculateRotatedState |
Return a state that is in the same group of states as the sprite's current state,
but possibly pointing a different direction.
| |
CanReturnToPreviousMap |
Determines if there is a previous map to return to.
(Inherited from GeneralRules.) | |
ChangeCounter |
Change a counter's value with a pre-defined operation.
(Inherited from GeneralRules.) | |
ClearAllMessages |
Clears all active messages from the display.
(Inherited from GeneralRules.) | |
ClearInputs |
Turns off all current inputs on this sprite.
| |
ClearOverlay |
Turn off the overlay map.
(Inherited from GeneralRules.) | |
ClearParameters |
Resets all parameter values defined on the specific sprite definition to 0.
| |
Clicked |
Determines if the specified mouse button is pressed.
(Inherited from GeneralRules.) | |
Deactivate |
Deactivate this sprite.
| |
DeactivateTargetSpriteFor |
Deactivate the sprite currently selected as the target for the specified name and clear the sprite selected for that target name.
(Inherited from GeneralRules.) | |
DeleteSave |
Empties the specified save slot.
(Inherited from GeneralRules.) | |
DragMap |
When the mouse drags over the display, scroll the map along with it.
(Inherited from GeneralRules.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExcludeCounterFromSaveUnit |
Exclude the specified counter from the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.) | |
ExcludeMapFromSaveUnit |
Remove the specified map in from the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.) | |
GetBounds |
Returns information about the visual boundaries of the sprite's currently displayed frame(s).
| |
GetCurrentFramesetFrames |
Get a list of frameset frames that the sprite is currently displaying
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetNearestSpriteIndex |
Compute the index of the nearest active sprite from the specified category and return it.
| |
GetPolarStateByVector |
Calculate the state that a rotating sprite should use in order to point in the direction it is currently traveling
| |
GetRandomNumber |
Return a random number within a specified range.
(Inherited from GeneralRules.) | |
GetRelativePosition |
Calculate the absolute position of a specified RelativePosition value with respect to this sprite.
| |
GetSelectedTargetFor |
Returns the sprite currently selected for the specified target name.
(Inherited from GeneralRules.) | |
GetTargetParameterFor |
Get the value of a numeric property or parameter on a sprite selected with SelectTargetSpriteFor(SpriteCollection, Int32, String).
(Inherited from GeneralRules.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IncludeCounterInSaveUnit |
Include the specified counter in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.) | |
IncludeInSaveUnit |
Includes a specified set of objects in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.) | |
IncludeMapInSaveUnit |
Include the specified map in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.) | |
IsInputPressed |
Determine if the specified input is being pressed for this sprite.
| |
IsInState |
Determines if the sprite is in the specified range of states.
| |
IsKeyPressed |
Determines if a specified key is being pressed.
(Inherited from GeneralRules.) | |
IsMapFlagOn |
Determine if the specified map-specific flag on the current map is on.
(Inherited from GeneralRules.) | |
IsMouseButtonPressed |
Determines if the specified mouse button is pressed.
(Inherited from GeneralRules.) | |
IsMoving |
Determines if the sprite is moving in the specified direction at all.
| |
IsOnTile |
Determines if a tile at the sprite's current position is a member of the specified category.
| |
IsPointBlocked |
Determines if the specified point within a sprite is blocked from moving in a particular direction by the specified number of pixels.
| |
IsRidingPlatform |
Determine if the sprite is riding another sprite
| |
IsSpriteForTargetOfType |
Determine if the sprite selected for the specified target (selected with SelectTargetSpriteFor)
is of the specified type.
(Inherited from GeneralRules.) | |
IsTargetSpriteSelectedFor |
Determine if a sprite has been selected with SelectLastCreatedSpriteFor(String)
or SelectTargetSpriteFor(SpriteCollection, Int32, String).
(Inherited from GeneralRules.) | |
LandDownOnPlatform |
Tests to see if this sprite is landing on a platform (from above), and if so,
make the sprite ride the platform.
| |
LimitFrameRate |
Limit the frame rate of the game to the specified number of frames per second. Call this only once per frame.
(Inherited from GeneralRules.) | |
LimitVelocity |
If the velocity of the sprite is more than the specified maximum, normalize it so that
it's going the same direction, but at no more that the specified maximum speed.
| |
LoadGame |
Restore the state of the objects contained in the specified save slot.
(Inherited from GeneralRules.) | |
LogDebugLabel |
Write a string to the debug output without moving to the next line.
(Inherited from GeneralRules.) | |
LogDebugValue |
Write a number to the debug output and move to the next line.
(Inherited from GeneralRules.) | |
MapKeyToInput |
Associates the state of the specified keyboard key with the specified input on this sprite.
| |
MapMouseToSprite |
Move the sprite to the position of the mouse cursor and set the sprite's button inputs based on mouse button states.
| |
MapPlayerToInputs |
Associate the state of the input device for the specified player with the inputs on this sprite.
| |
MoveByVelocity |
Move this sprite according to its current velocity
| |
PolarAccelerate |
Accelerate a rotating sprite in the direction that it is aiming.
| |
ProcessRules |
Execute the rules for this sprite if they have not already been executed this frame
| |
PushSprite |
Alter the velocity of TargetSprite to plan to move out of the way of this sprite
if TargetSprite is obstructing this sprite.
| |
PushSpriteIntoView |
Alter this sprite's velocity so that it remains within the map's visible area or
within the scroll margins, according to this sprite's layer's position within the map.
| |
PushTowardCategory |
Push this sprite toward a sprite in the specified category.
| |
PushTowardSprite |
Push this sprite toward a specified sprite.
| |
QuitGame |
Quit the game by closing the main window.
(Inherited from GeneralRules.) | |
ReactToInertia |
Reduces the sprite's velocity to simulate friction.
| |
ReactToPlatform |
Adjust this sprite's velocity according to the motion of the platform it is riding
| |
ReactToPush |
Alter the velocity of this sprite to plan to move out of the way of sprites in Pushers
if this sprite is obstructing sprites in Pushers.
| |
ReactToPushback |
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).
| |
ReactToSolid |
Alter the sprite's velocity to react to solid areas on the map.
| |
RemoveFromCategories |
Remove the sprite from its designated categories.
USE ONLY on dynamically added sprites.
| |
ResetLights |
Reset all light sources to initial default behavior.
(Inherited from GeneralRules.) | |
ReturnToPreviousMap |
Return to the map that was active before the last SwitchToMap(Type, Boolean).
(Inherited from GeneralRules.) | |
RotateVelocity |
Redirect this sprite's velocity to be 100% in the direction that it is facing.
| |
SaveExists |
Determines if saved game data exists in the specified slot.
(Inherited from GeneralRules.) | |
SaveGame |
Save the current SaveUnit into the specified save slot.
(Inherited from GeneralRules.) | |
ScrollSpriteIntoView |
Scroll all layers on this sprite's layer's map so that the sprite is within visible area of the map.
| |
SelectLastCreatedSprite |
Select the most recently created sprite to be the target of SetTargetParameter(String, Int32).
(Inherited from GeneralRules.) | |
SelectLastCreatedSpriteFor |
Selects the most recently created sprite to be the target of SetTargetParameterFor(String, Int32, String)
or GetTargetParameterFor(String, String).
(Inherited from GeneralRules.) | |
SelectTargetSprite |
Selects a sprite within a collection, using a 0-based index, to be the target of SetTargetParameter(String, Int32).
(Inherited from GeneralRules.) | |
SelectTargetSpriteFor |
Selects a sprite within a collection, using a 0-based index, to be the target of SetTargetParameterFor(String, Int32, String).
TargetName allows any number of unique targets to be selected by assigning unique names.
(Inherited from GeneralRules.) | |
SetCategorySpriteState |
Sets the current state of a sprite based on a category and index into the category.
(Inherited from GeneralRules.) | |
SetInputState |
Turns on or off the specified input on this sprite.
| |
SetInputsTowardCategory |
Set the state of the directional inputs on this sprite to move toward the specified sprite in a category.
| |
SetInputsTowardSprite |
Set the state of the directional inputs on this sprite to move toward the specified sprite.
| |
SetMapFlag |
Turn on or off a flag associated with the current map.
(Inherited from GeneralRules.) | |
SetMessageBackground |
Sets the background for new messages added with ShowMessage(String).
(Inherited from GeneralRules.) | |
SetMessageDismissal |
Determines which player and which button will dismiss newly created messages.
(Inherited from GeneralRules.) | |
SetMessageFont |
Set the tileset used as the source for characters in messages.
(Inherited from GeneralRules.) | |
SetMessagePosition |
Determines where newly created messages appear.
(Inherited from GeneralRules.) | |
SetOverlay |
Set the overlay map.
(Inherited from GeneralRules.) | |
SetSolidity |
Set the solidity rules to which the sprite is currently reacting.
| |
SetTargetMapFlag |
Turn on or off a flag associated with the specified map.
(Inherited from GeneralRules.) | |
SetTargetParameter |
Set the value of a numeric property or parameter on a sprite selected with SelectTargetSprite(SpriteCollection, Int32) to the specified value.
(Inherited from GeneralRules.) | |
SetTargetParameterFor |
Set the value of a numeric property or parameter on a sprite selected with SelectTargetSpriteFor(SpriteCollection, Int32, String) to the specified value.
(Inherited from GeneralRules.) | |
SetViewLayout |
Sets the layout of multiple views for the current map.
(Inherited from GeneralRules.) | |
ShowMessage |
Adds a message to the display.
(Inherited from GeneralRules.) | |
SnapToGround |
Ensure the sprite stays in contact with the ground by altering its velocity
to snap down onto the ground when it is close to the ground.
| |
StopRiding |
Stop riding the sprite that this sprite is currently riding, if any.
| |
SwitchToMap |
Sets a different map as the one to be drawn on the game display.
(Inherited from GeneralRules.) | |
SwitchToState |
Switch the sprite to the the specified state, ensuring that the sprite doesn't hit a solid.
| |
TestCollisionMask |
Determine whether the sprite's collision mask is overlapping part of any sprite in the specified category.
| |
TestCollisionRect(SpriteBase) |
Determine if this sprite is planning to overlap the target sprite.
| |
TestCollisionRect(SpriteCollection) |
Determine whether the solidity rectangle of the sprite overlaps that of any sprite in the specified category.
| |
TileActivateSprite |
Activate the next inactive sprite from a category at the coordinates of a tile being touched by the sprite.
| |
TileAddSprite |
Create a new (dynamic) instance of the specified sprite type at the coordinates
of a tile being touched by the player.
| |
TileCategoryTouched |
Determine if the sprite is touching a tile in the specified category (requires TouchTiles(TileCategoryName)).
| |
TileChange |
Change tiles of the specified type that the sprite is touching to another tile (requires TouchTiles(TileCategoryName)).
| |
TileChangeTouched |
Change the tile specified by TouchingIndex that is being touched by the sprite to another tile (requires TouchTiles(TileCategoryName)).
| |
TileTake |
Determine if the sprite is touching the specified tile, and if so,
"take" it and increment a counter (requires TouchTiles(TileCategoryName)).
| |
TileTouchingIndex |
Find the next unprocessed tile of the specified type (requires TouchTiles(TileCategoryName)).
| |
TileUseUp |
Make the specified tile behave like it is "using up" one of the items tracked by the specified counter (requires TouchTiles(TileCategoryName)).
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TouchTiles |
Collects information about tiles the sprite is currently touching.
| |
UnloadBackgroundMaps |
Unload all maps that aren't currently visible.
(Inherited from GeneralRules.) | |
UnloadMap |
Unloads the specified map.
(Inherited from GeneralRules.) |