C# Class PrinceGame.Tile

Show file Open project: salvadorc17/Prince-Monogame Class Usage Examples

Public Properties

Property Type Description
CHOMPER_DISTANCE_PENETRATION_L int
CHOMPER_DISTANCE_PENETRATION_R int
GROUND int
HEIGHT int
MASK_BLOCK Microsoft.Xna.Framework.Rectangle
MASK_DOOR Microsoft.Xna.Framework.Rectangle
MASK_FLOOR Microsoft.Xna.Framework.Rectangle
MASK_POSTS Microsoft.Xna.Framework.Rectangle
PERSPECTIVE int
REALHEIGHT int
REALWIDTH int
Size Vector2
Texture Microsoft.Xna.Framework.Graphics.Texture2D
Type Enumeration.TileType
WIDTH int
collision Enumeration.TileCollision
item Item
nextTileType Enumeration.TileType
tileAnimation AnimationSequence
tileState TileState

Protected Properties

Property Type Description
room RoomNew

Public Methods

Method Description
HandleCollision ( ) : void
Tile ( ) : System
Tile ( RoomNew room, Microsoft.Xna.Framework.Content.ContentManager Content, Enumeration tileType, Enumeration state, Enumeration eitem, Enumeration NextTileType__1 ) : System
Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void

Handles input, performs physics, and animates the player sprite.

We pass in all of the input states so that our game is only polling the hardware once per frame. We also pass the game's orientation because when using the accelerometer, we need to reverse our motion when the orientation is in the LandscapeRight orientation.

Method Details

HandleCollision() public method

public HandleCollision ( ) : void
return void

Tile() public method

public Tile ( ) : System
return System

Tile() public method

public Tile ( RoomNew room, Microsoft.Xna.Framework.Content.ContentManager Content, Enumeration tileType, Enumeration state, Enumeration eitem, Enumeration NextTileType__1 ) : System
room RoomNew
Content Microsoft.Xna.Framework.Content.ContentManager
tileType Enumeration
state Enumeration
eitem Enumeration
NextTileType__1 Enumeration
return System

Update() public method

Handles input, performs physics, and animates the player sprite.
We pass in all of the input states so that our game is only polling the hardware once per frame. We also pass the game's orientation because when using the accelerometer, we need to reverse our motion when the orientation is in the LandscapeRight orientation.
public Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
gameTime Microsoft.Xna.Framework.GameTime
keyboardState Microsoft.Xna.Framework.Input.KeyboardState
gamePadState Microsoft.Xna.Framework.Input.GamePadState
touchState TouchCollection
accelState AccelerometerState
orientation DisplayOrientation
return void

Property Details

CHOMPER_DISTANCE_PENETRATION_L public static property

public static int CHOMPER_DISTANCE_PENETRATION_L
return int

CHOMPER_DISTANCE_PENETRATION_R public static property

public static int CHOMPER_DISTANCE_PENETRATION_R
return int

GROUND public static property

public static int GROUND
return int

HEIGHT public static property

public static int HEIGHT
return int

MASK_BLOCK public static property

public static Rectangle,Microsoft.Xna.Framework MASK_BLOCK
return Microsoft.Xna.Framework.Rectangle

MASK_DOOR public static property

public static Rectangle,Microsoft.Xna.Framework MASK_DOOR
return Microsoft.Xna.Framework.Rectangle

MASK_FLOOR public static property

public static Rectangle,Microsoft.Xna.Framework MASK_FLOOR
return Microsoft.Xna.Framework.Rectangle

MASK_POSTS public static property

public static Rectangle,Microsoft.Xna.Framework MASK_POSTS
return Microsoft.Xna.Framework.Rectangle

PERSPECTIVE public static property

public static int PERSPECTIVE
return int

REALHEIGHT public static property

public static int REALHEIGHT
return int

REALWIDTH public static property

public static int REALWIDTH
return int

Size public static property

public static Vector2 Size
return Vector2

Texture public property

public Texture2D,Microsoft.Xna.Framework.Graphics Texture
return Microsoft.Xna.Framework.Graphics.Texture2D

Type public property

public Enumeration.TileType Type
return Enumeration.TileType

WIDTH public static property

public static int WIDTH
return int

collision public property

public Enumeration.TileCollision collision
return Enumeration.TileCollision

item public property

public Item item
return Item

nextTileType public property

public Enumeration.TileType nextTileType
return Enumeration.TileType

room protected property

protected RoomNew,PrinceGame room
return RoomNew

tileAnimation public property

public AnimationSequence,PrinceGame tileAnimation
return AnimationSequence

tileState public property

public TileState,PrinceGame tileState
return TileState