Property | Type | Description | |
---|---|---|---|
center | Vector2 |
Method | Description | |
---|---|---|
Draw ( |
||
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void |
Loading the textures
|
|
Map ( ) : System | ||
drawOnMap ( |
Renders a texture onto the map using the given spritebatch and map position
|
|
screenToWorld ( Vector2 pos ) : Vector2 |
Returns the world position relative to the screen position given
|
|
setViewPos ( Vector2 pos ) : void |
Center the screen on the given world coordinate
|
|
worldToScreen ( Vector2 pos ) : Vector2 |
Returns the screen position matching the given world position
|
Method | Description | |
---|---|---|
Grid ( int x, int y ) : |
Returns the grid at the relative position with bounds checking
|
public Draw ( |
||
batch | ||
return | void |
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void | ||
content | Microsoft.Xna.Framework.Content.ContentManager | The manager handling the textures |
return | void |
public drawOnMap ( |
||
batch | Spritebatch to render the texture | |
tex | Microsoft.Xna.Framework.Graphics.Texture2D | Texture we want to render |
pos | Vector2 | |
return | void |
public screenToWorld ( Vector2 pos ) : Vector2 | ||
pos | Vector2 | The screen position |
return | Vector2 |
public setViewPos ( Vector2 pos ) : void | ||
pos | Vector2 | World Coordinate |
return | void |
public worldToScreen ( Vector2 pos ) : Vector2 | ||
pos | Vector2 | world position |
return | Vector2 |