Click or drag to resize
PlanBase Class
Base class for "plans", which consist of map coordinates and rules
Inheritance Hierarchy

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
[SerializableAttribute]
public abstract class PlanBase : GeneralRules, 
	IEnumerable

The PlanBase type exposes the following members.

Methods
  NameDescription
Public methodActivateSprite
Make the specified sprite active.
Public methodAddSpriteAtPlan
Create a new (dynamic) instance of the specified sprite type at the first coordinate in this plan.
Public methodApplyLights
Use properties of the sprites in the specified category to configure real-time lighting on the display for the current frame.
(Inherited from GeneralRules.)
Public methodCanReturnToPreviousMap
Determines if there is a previous map to return to.
(Inherited from GeneralRules.)
Public methodChangeCounter
Change a counter's value with a pre-defined operation.
(Inherited from GeneralRules.)
Public methodCode exampleCheckNextCoordinate
Make a sprite move toward the next coordinate in the plan when appropriate.
Public methodClearAllMessages
Clears all active messages from the display.
(Inherited from GeneralRules.)
Public methodClearOverlay
Turn off the overlay map.
(Inherited from GeneralRules.)
Public methodClicked
Determines if the specified mouse button is pressed.
(Inherited from GeneralRules.)
Public methodCopyFrom
Copy tiles from the specified plan's rectangle to this plan's rectangle.
Public methodCopyInputsToOld
Ensure that all the inputs currently being pressed on the specified sprite are henceforth processed as already pressed.
Public methodCopyTo
Copy tiles from this plan's rectangle to another plan's rectangle.
Public methodDeactivateCategorySprite
Deactivate a sprite within a category given the sprite's index within the category.
Public methodDeactivateSprite
Make the specified sprite inactive.
Public methodDeactivateTargetSpriteFor
Deactivate the sprite currently selected as the target for the specified name and clear the sprite selected for that target name.
(Inherited from GeneralRules.)
Public methodDeleteSave
Empties the specified save slot.
(Inherited from GeneralRules.)
Public methodDoor
If any sprite in the specified category is within the bounds of this plan or the Target plan, and is pressing the specified Trigger, transport it to the other plan.
Public methodDragMap
When the mouse drags over the display, scroll the map along with it.
(Inherited from GeneralRules.)
Public methodDrawCounterAsTile
Draw the value of a counter as a bar filled with a tile's image.
Public methodDrawCounterWithLabel
Display a counter value as a number with a label in the current plan's rectangle.
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).
(Inherited from GeneralRules.)
Public methodExcludeMapFromSaveUnit
Remove the specified map in from the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.)
Public methodExecuteRules
Public methodExecuteRulesInternal
Executes this plan's rules if any exist.
Public methodFollowPath
Cause the specified sprite to follow the coordinates in this plan as a path.
Public methodGetEnumerator
Allows a the coordinates of a plan to be enumerated with a foreach loop.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRandomNumber
Return a random number within a specified range.
(Inherited from GeneralRules.)
Public methodGetSelectedTargetFor
Returns the sprite currently selected for the specified target name.
(Inherited from GeneralRules.)
Public methodGetSpriteWithin
Determines if the specified part of any active sprite in the specified category is within the plan's rectangle.
Public methodGetTargetParameterFor
Get the value of a numeric property or parameter on a sprite selected with SelectTargetSpriteFor(SpriteCollection, Int32, String).
(Inherited from GeneralRules.)
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).
(Inherited from GeneralRules.)
Public methodIncludeInSaveUnit
Includes a specified set of objects in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.)
Public methodIncludeMapInSaveUnit
Include the specified map in the SaveUnit that will be saved with the next call to SaveGame(Int32, Boolean).
(Inherited from GeneralRules.)
Public methodIsInputPressed
Determines if the specified sprite's specified input is pressed.
Public methodIsKeyPressed
Determines if a specified key is being pressed.
(Inherited from GeneralRules.)
Public methodIsMapFlagOn
Determine if the specified map-specific flag on the current map is on.
(Inherited from GeneralRules.)
Public methodIsMouseButtonPressed
Determines if the specified mouse button is pressed.
(Inherited from GeneralRules.)
Public methodCode exampleIsSpriteActive
Determines if the specified sprite instace is active.
Public methodIsSpriteForTargetOfType
Determine if the sprite selected for the specified target (selected with SelectTargetSpriteFor) is of the specified type.
(Inherited from GeneralRules.)
Public methodIsSpriteTouching
Determines if the specified sprite is touching this plan's rectangle.
Public methodIsSpriteWithin
Determines if the specified part of the specified sprite is within the plan's rectangle.
Public methodIsSpriteWithinPolygon
Public methodIsTargetSpriteSelectedFor (Inherited from GeneralRules.)
Public methodLimitFrameRate
Limit the frame rate of the game to the specified number of frames per second. Call this only once per frame.
(Inherited from GeneralRules.)
Public methodLoadGame
Restore the state of the objects contained in the specified save slot.
(Inherited from GeneralRules.)
Public methodCode exampleLogDebugLabel
Write a string to the debug output without moving to the next line.
(Inherited from GeneralRules.)
Public methodCode exampleLogDebugValue
Write a number to the debug output and move to the next line.
(Inherited from GeneralRules.)
Public methodMapMouseToSprite
Move the specified sprite to the position of the mouse cursor and set the sprite's button inputs based on mouse button states.
Public methodMapPlayerToInputs
Associate the state of the input device for the specified player with the inputs on the specified sprite.
Public methodMatchSpritePosition
Set the position of the target sprite to match that of the source sprite.
Public methodCode exampleModulateColor
Modulate/scale the specified color channel of the specified sprite to the specified level.
Public methodPushSpriteIntoView
Alter a sprite's velocity so that it remains within the map's visible area.
Public methodCode examplePushSpriteTowardCoordinate
Alter the velocity of the specified sprite to go toward a coordinate associated with the current plan.
Public methodCode examplePushSpriteTowardPoint
Alter the velocity of the specified sprite to go toward a specified location.
Public methodPushSpriteTowardSprite
Push the specified Source sprite toward the specified Target sprite.
Public methodQuitGame
Quit the game by closing the main window.
(Inherited from GeneralRules.)
Public methodResetLights
Reset all light sources to initial default behavior.
(Inherited from GeneralRules.)
Public methodReturnToPreviousMap
Return to the map that was active before the last SwitchToMap(Type, Boolean).
(Inherited from GeneralRules.)
Public methodSaveExists
Determines if saved game data exists in the specified slot.
(Inherited from GeneralRules.)
Public methodSaveGame
Save the current SaveUnit into the specified save slot.
(Inherited from GeneralRules.)
Public methodScrollSpriteIntoView
Scroll all layers on this plan's layer's map so that the specified sprite is within the visible area of the map.
Public methodSelectLastCreatedSprite
Select the most recently created sprite to be the target of SetTargetParameter(String, Int32).
(Inherited from GeneralRules.)
Public methodSelectLastCreatedSpriteFor
Selects the most recently created sprite to be the target of SetTargetParameterFor(String, Int32, String) or GetTargetParameterFor(String, String).
(Inherited from GeneralRules.)
Public methodSelectTargetSprite
Selects a sprite within a collection, using a 0-based index, to be the target of SetTargetParameter(String, Int32).
(Inherited from GeneralRules.)
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.
(Inherited from GeneralRules.)
Public methodSetCategorySpriteState
Sets the current state of a sprite based on a category and index into the category.
(Inherited from GeneralRules.)
Public methodSetMapFlag
Turn on or off a flag associated with the current map.
(Inherited from GeneralRules.)
Public methodSetMessageBackground
Sets the background for new messages added with ShowMessage(String).
(Inherited from GeneralRules.)
Public methodSetMessageDismissal
Determines which player and which button will dismiss newly created messages.
(Inherited from GeneralRules.)
Public methodSetMessageFont
Set the tileset used as the source for characters in messages.
(Inherited from GeneralRules.)
Public methodSetMessagePosition
Determines where newly created messages appear.
(Inherited from GeneralRules.)
Public methodSetOverlay
Set the overlay map.
(Inherited from GeneralRules.)
Public methodSetTargetMapFlag
Turn on or off a flag associated with the specified map.
(Inherited from GeneralRules.)
Public methodSetTargetParameter
Set the value of a numeric property or parameter on a sprite selected with SelectTargetSprite(SpriteCollection, Int32) to the specified value.
(Inherited from GeneralRules.)
Public methodSetTargetParameterFor
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.)
Public methodSetViewLayout
Sets the layout of multiple views for the current map.
(Inherited from GeneralRules.)
Public methodShowMessage
Adds a message to the display.
(Inherited from GeneralRules.)
Public methodCode exampleStopSprite
Stops the sprite's current motion
Public methodSwitchToMap
Sets a different map as the one to be drawn on the game display.
(Inherited from GeneralRules.)
Public methodTestCollisionMask
Determines whether the specified sprite's collision mask is overlapping part of any sprite in the specified category.
Public methodTestCollisionRect
Determines whether the solidity rectangle of the specified sprite overlaps that of any sprite in the specified category.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransportToPlan
Moves the specified sprite to the specified plan's rectangle, aligned to the specified corner/edge.
Public methodCode exampleTransportToPoint
Moves the specified sprite to the specified coordinate.
Public methodUnloadBackgroundMaps
Unload all maps that aren't currently visible.
(Inherited from GeneralRules.)
Public methodUnloadMap
Unloads the specified map.
(Inherited from GeneralRules.)
Public methodWasSpriteTouching
Determines if the specified sprite was touching this plan's rectangle in the previous frame.
Top
Fields
  NameDescription
Public fieldStatic memberSharedTemp1
This is provided as a temporary storage area for numbers while processing plan rules.
Public fieldTargetDistance
This value is used by CheckNextCoordinate(SpriteBase, Int32, Int32) to determine how close a sprite must be to a coordinate before heading to the next coordinate.
Top
Properties
  NameDescription
Public propertyCount
Retrieves the number of coordinates that this plan contains
Public propertyCurrentView
If multiple views are visible, this determines which view is currently active.
(Inherited from GeneralRules.)
Public propertyCode exampleItem
Retrieves the coordinate specified by a 0-based index for this plan
Public propertyParentLayer
Retrieves the layer that contains this object.
(Inherited from GeneralRules.)
Public propertyPlanRectangle
Returns the rectangle defined by a plan
Top
See Also