C# Class MoodSwingGame.MSMap

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Afficher le fichier Open project: verngutz/MoodSwing Class Usage Examples

Méthodes publiques

Свойство Type Description
floorheight int
hallheight int
shortheight int
tallheight int
tileDimension int

Méthodes publiques

Méthode Description
CalculateRay ( Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport ) : Microsoft.Xna.Framework.Ray

Calculates the ray formed from the mouse to the world space.

Draw ( GameTime gameTime ) : void
GetNearestVolunteerCenter ( MS3DTile reference ) : MSVolunteerCenter

Gets the nearest volunteer center with respect to a specific tile.

GetNearestVolunteerCenter ( Vector2 coord ) : MSVolunteerCenter
GetPath ( Vector2 start, Vector2 end ) : Node

Gets the head of the linked-list representing the shortest path from start to end in the map coordinate system.

GetRandomCitizenSource ( ) : MSUnchangeableBuilding
Intersects ( Microsoft.Xna.Framework.BoundingBox box, Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport ) : float?

Checks whether the mouse intersects the bounding box of an object.

MSMap ( String filename ) : System
PickFrom3DWorld ( ) : MS3DTile

Picking Algo. Looks for the closest object that intersects the mouse ray

Update ( GameTime gameTime ) : void
load ( StreamReader sr ) : void
toString ( ) : String

Method Details

CalculateRay() public méthode

Calculates the ray formed from the mouse to the world space.
public CalculateRay ( Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport ) : Microsoft.Xna.Framework.Ray
mouseLocation Vector2 Vector2D corresponding to the coordinate of the mouse on the screen.
view Matrix View matrix used
projection Matrix Projection matrix used
viewport Microsoft.Xna.Framework.Graphics.Viewport Viewport of the game
Résultat Microsoft.Xna.Framework.Ray

Draw() public méthode

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

GetNearestVolunteerCenter() public méthode

Gets the nearest volunteer center with respect to a specific tile.
public GetNearestVolunteerCenter ( MS3DTile reference ) : MSVolunteerCenter
reference MS3DTile Tile used as a reference point to find the nearest volunteer center
Résultat MSVolunteerCenter

GetNearestVolunteerCenter() public méthode

public GetNearestVolunteerCenter ( Vector2 coord ) : MSVolunteerCenter
coord Vector2
Résultat MSVolunteerCenter

GetPath() public méthode

Gets the head of the linked-list representing the shortest path from start to end in the map coordinate system.
public GetPath ( Vector2 start, Vector2 end ) : Node
start Vector2 The start tile coordinate.
end Vector2 The end tile coordinate.
Résultat Node

GetRandomCitizenSource() public méthode

public GetRandomCitizenSource ( ) : MSUnchangeableBuilding
Résultat MSUnchangeableBuilding

Intersects() public méthode

Checks whether the mouse intersects the bounding box of an object.
public Intersects ( Microsoft.Xna.Framework.BoundingBox box, Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport ) : float?
box Microsoft.Xna.Framework.BoundingBox Bounding box of the object to check for intersection.
mouseLocation Vector2 Vector2D corresponding to the coordinate of the mouse on the screen.
view Matrix View matrix used
projection Matrix Projection matrix used
viewport Microsoft.Xna.Framework.Graphics.Viewport Viewport of the game
Résultat float?

MSMap() public méthode

public MSMap ( String filename ) : System
filename String
Résultat System

PickFrom3DWorld() public méthode

Picking Algo. Looks for the closest object that intersects the mouse ray
public PickFrom3DWorld ( ) : MS3DTile
Résultat MS3DTile

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

load() public méthode

public load ( StreamReader sr ) : void
sr System.IO.StreamReader
Résultat void

toString() public méthode

public toString ( ) : String
Résultat String

Property Details

floorheight public_oe static_oe property

public static int floorheight
Résultat int

hallheight public_oe static_oe property

public static int hallheight
Résultat int

shortheight public_oe static_oe property

public static int shortheight
Résultat int

tallheight public_oe static_oe property

public static int tallheight
Résultat int

tileDimension public_oe static_oe property

public static int tileDimension
Résultat int