Click or drag to resize
GeneralRules Methods

The GeneralRules type exposes the following members.

Methods
  NameDescription
Public methodApplyLights
Use properties of the sprites in the specified category to configure real-time lighting on the display for the current frame.
Public methodCanReturnToPreviousMap
Determines if there is a previous map to return to.
Public methodChangeCounter
Change a counter's value with a pre-defined operation.
Public methodClearAllMessages
Clears all active messages from the display.
Public methodClearOverlay
Turn off the overlay map.
Public methodClicked
Determines if the specified mouse button is pressed.
Public methodDeactivateTargetSpriteFor
Deactivate the sprite currently selected as the target for the specified name and clear the sprite selected for that target name.
Public methodDeleteSave
Empties the specified save slot.
Public methodDragMap
When the mouse drags over the display, scroll the map along with it.
Public methodStatic memberDrawMessages
Draws all active messages.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExcludeCounterFromSaveUnit
Exclude the specified counter from the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
Public methodExcludeMapFromSaveUnit
Remove the specified map in from the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRandomNumber
Return a random number within a specified range.
Public methodGetSelectedTargetFor
Returns the sprite currently selected for the specified target name.
Public methodGetTargetParameterFor
Get the value of a numeric property or parameter on a sprite selected with SelectTargetSpriteFor(SpriteCollection, Int32, String).
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIncludeCounterInSaveUnit
Include the specified counter in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
Public methodIncludeInSaveUnit
Includes a specified set of objects in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
Public methodIncludeMapInSaveUnit
Include the specified map in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
Public methodIsKeyPressed
Determines if a specified key is being pressed.
Public methodIsMapFlagOn
Determine if the specified map-specific flag on the current map is on.
Public methodIsMouseButtonPressed
Determines if the specified mouse button is pressed.
Public methodIsSpriteForTargetOfType
Determine if the sprite selected for the specified target (selected with SelectTargetSpriteFor) is of the specified type.
Public methodIsTargetSpriteSelectedFor
Public methodLimitFrameRate
Limit the frame rate of the game to the specified number of frames per second. Call this only once per frame.
Public methodLoadGame
Restore the state of the objects contained in the specified save slot.
Public methodCode exampleLogDebugLabel
Write a string to the debug output without moving to the next line.
Public methodCode exampleLogDebugValue
Write a number to the debug output and move to the next line.
Public methodStatic memberPlayerPressButton
Handles button pressses from a player with respect to displayed messages
Public methodQuitGame
Quit the game by closing the main window.
Public methodResetLights
Reset all light sources to initial default behavior.
Public methodReturnToPreviousMap
Return to the map that was active before the last SwitchToMap(Type, Boolean).
Public methodSaveExists
Determines if saved game data exists in the specified slot.
Public methodSaveGame
Save the current SaveUnit into the specified save slot.
Public methodSelectLastCreatedSprite
Select the most recently created sprite to be the target of SetTargetParameter(String, Int32).
Public methodSelectLastCreatedSpriteFor
Selects the most recently created sprite to be the target of SetTargetParameterFor(String, Int32, String) or GetTargetParameterFor(String, String).
Public methodSelectTargetSprite
Selects a sprite within a collection, using a 0-based index, to be the target of SetTargetParameter(String, Int32).
Public methodSelectTargetSpriteFor
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.
Public methodSetCategorySpriteState
Sets the current state of a sprite based on a category and index into the category.
Public methodSetMapFlag
Turn on or off a flag associated with the current map.
Public methodSetMessageBackground
Sets the background for new messages added with ShowMessage(String).
Public methodSetMessageDismissal
Determines which player and which button will dismiss newly created messages.
Public methodSetMessageFont
Set the tileset used as the source for characters in messages.
Public methodSetMessagePosition
Determines where newly created messages appear.
Public methodSetOverlay
Set the overlay map.
Public methodSetTargetMapFlag
Turn on or off a flag associated with the specified map.
Public methodSetTargetParameter
Set the value of a numeric property or parameter on a sprite selected with SelectTargetSprite(SpriteCollection, Int32) to the specified value.
Public methodSetTargetParameterFor
Set the value of a numeric property or parameter on a sprite selected with SelectTargetSpriteFor(SpriteCollection, Int32, String) to the specified value.
Public methodSetViewLayout
Sets the layout of multiple views for the current map.
Public methodShowMessage
Adds a message to the display.
Public methodSwitchToMap
Sets a different map as the one to be drawn on the game display.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnloadBackgroundMaps
Unload all maps that aren't currently visible.
Public methodUnloadMap
Unloads the specified map.
Top
See Also