C# Класс MoodSwingGame.MSMap

Наследование: Microsoft.Xna.Framework.DrawableGameComponent
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
floorheight int
hallheight int
shortheight int
tallheight int
tileDimension int

Открытые методы

Метод Описание
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

Описание методов

CalculateRay() публичный Метод

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
Результат Microsoft.Xna.Framework.Ray

Draw() публичный Метод

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

GetNearestVolunteerCenter() публичный Метод

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
Результат MSVolunteerCenter

GetNearestVolunteerCenter() публичный Метод

public GetNearestVolunteerCenter ( Vector2 coord ) : MSVolunteerCenter
coord Vector2
Результат MSVolunteerCenter

GetPath() публичный Метод

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.
Результат Node

GetRandomCitizenSource() публичный Метод

public GetRandomCitizenSource ( ) : MSUnchangeableBuilding
Результат MSUnchangeableBuilding

Intersects() публичный Метод

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
Результат float?

MSMap() публичный Метод

public MSMap ( String filename ) : System
filename String
Результат System

PickFrom3DWorld() публичный Метод

Picking Algo. Looks for the closest object that intersects the mouse ray
public PickFrom3DWorld ( ) : MS3DTile
Результат MS3DTile

Update() публичный Метод

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

load() публичный Метод

public load ( StreamReader sr ) : void
sr System.IO.StreamReader
Результат void

toString() публичный Метод

public toString ( ) : String
Результат String

Описание свойств

floorheight публичное статическое свойство

public static int floorheight
Результат int

hallheight публичное статическое свойство

public static int hallheight
Результат int

shortheight публичное статическое свойство

public static int shortheight
Результат int

tallheight публичное статическое свойство

public static int tallheight
Результат int

tileDimension публичное статическое свойство

public static int tileDimension
Результат int