C# 클래스 MoodSwingGame.MSMap

상속: Microsoft.Xna.Framework.DrawableGameComponent
파일 보기 프로젝트 열기: verngutz/MoodSwing 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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