C#Code
C#Code
Public Member Functions | Static Public Attributes | Private Attributes
Libraries.Sprites.PointInSprite2DProperty Class Reference
Inheritance diagram for Libraries.Sprites.PointInSprite2DProperty:
Libraries.Sprites.BaseSpriteProperty Libraries.Sprites.BaseSpriteProperty Libraries.ObjectProperties.BaseObjectProperty Libraries.ObjectProperties.BaseObjectProperty Libraries.BaseObject Libraries.BaseObject Libraries.Sprites.ClickableSprite2DProperty Libraries.Sprites.ClickableSprite2DProperty

List of all members.

Public Member Functions

 PointInSprite2DProperty ()
override StringType GetPropertyType ()
override void Update (int timePassed, Sprite2D sprite)
void SetCheckForTransparency (bool checkForTrans)
virtual bool CheckPointOnSprite (Sprite2D sprite, Microsoft.Xna.Framework.Vector2 point)
override void Clear ()
 PointInSprite2DProperty ()
override StringType GetPropertyType ()
override void Update (int timePassed, Sprite2D sprite)
void SetCheckForTransparency (bool checkForTrans)
virtual bool CheckPointOnSprite (Sprite2D sprite, Microsoft.Xna.Framework.Vector2 point)
override void Clear ()

Static Public Attributes

static readonly StringType s_pointInSprite2D = new StringType("PointInSprite2DProperty")
 Type that represents the property.

Private Attributes

bool m_checkForTransparency

Detailed Description

Sprite2D property. Checks if a point is inside a 2D sprite. Can check for transparency as well. Should not be used for sprites that are scaled, rotated or flipped (for now).


Constructor & Destructor Documentation

Libraries.Sprites.PointInSprite2DProperty.PointInSprite2DProperty ( )

Default constructor.

Libraries.Sprites.PointInSprite2DProperty.PointInSprite2DProperty ( )

Default constructor.


Member Function Documentation

virtual bool Libraries.Sprites.PointInSprite2DProperty.CheckPointOnSprite ( Sprite2D  sprite,
Microsoft.Xna.Framework.Vector2  point 
) [virtual]

Check if a given point would be on the sprite.

sprite - Sprite the property is in.
point - Position to check for in the sprite.

Return:
Value is true if the point was on the sprite, false if not.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

virtual bool Libraries.Sprites.PointInSprite2DProperty.CheckPointOnSprite ( Sprite2D  sprite,
Microsoft.Xna.Framework.Vector2  point 
) [virtual]

Check if a given point would be on the sprite.

sprite - Sprite the property is in.
point - Position to check for in the sprite.

Return:
Value is true if the point was on the sprite, false if not.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

override void Libraries.Sprites.PointInSprite2DProperty.Clear ( ) [virtual]

Clear the data objects stored in the object.

Reimplemented from Libraries.Sprites.BaseSpriteProperty.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

override void Libraries.Sprites.PointInSprite2DProperty.Clear ( ) [virtual]

Clear the data objects stored in the object.

Reimplemented from Libraries.Sprites.BaseSpriteProperty.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

override StringType Libraries.Sprites.PointInSprite2DProperty.GetPropertyType ( ) [virtual]

Sprite2D property. Checks if a point is inside a 2D sprite. Can check for transparency as well. Should not be used for sprites that are scaled or rotated (for now).

Return:
Value is the property ID.

Implements Libraries.Sprites.BaseSpriteProperty.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

override StringType Libraries.Sprites.PointInSprite2DProperty.GetPropertyType ( ) [virtual]

Sprite2D property. Checks if a point is inside a 2D sprite. Can check for transparency as well. Should not be used for sprites that are scaled or rotated (for now).

Implements Libraries.Sprites.BaseSpriteProperty.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

void Libraries.Sprites.PointInSprite2DProperty.SetCheckForTransparency ( bool  checkForTrans)

Sets whether transparency is checked for. True if transparency pixels are ignored, false if they count.

void Libraries.Sprites.PointInSprite2DProperty.SetCheckForTransparency ( bool  checkForTrans)

Sets whether transparency is checked for.

checkForTrans - True if transparency pixels are ignored, false if they count.
override void Libraries.Sprites.PointInSprite2DProperty.Update ( int  timePassed,
Sprite2D  sprite 
) [virtual]

Update the property.

timePassed - How long the update is for.
sprite - The sprite the property is in. This way the property can make changes to the sprite.

Implements Libraries.Sprites.BaseSpriteProperty.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.

override void Libraries.Sprites.PointInSprite2DProperty.Update ( int  timePassed,
Sprite2D  sprite 
) [virtual]

Update the property.

timePassed - How long the update is for.
sprite - The sprite the property is in. This way the property can make changes to the sprite.

Implements Libraries.Sprites.BaseSpriteProperty.

Reimplemented in Libraries.Sprites.ClickableSprite2DProperty, and Libraries.Sprites.ClickableSprite2DProperty.


Member Data Documentation

Value is true if the property checks for transparency in the texture. If true, then if the point is on transparency it won't count as being on the sprite.

static readonly StringType Libraries::Sprites.PointInSprite2DProperty::s_pointInSprite2D = new StringType("PointInSprite2DProperty") [static]

Type that represents the property.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties