C# 클래스 manlyMiniGames.Map

파일 보기 프로젝트 열기: degrand1/Manly-Mini-Games 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
center Vector2

공개 메소드들

메소드 설명
Draw ( SpriteBatch batch ) : void
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void

Loading the textures

Map ( ) : System
drawOnMap ( SpriteBatch batch, Microsoft.Xna.Framework.Graphics.Texture2D tex, Vector2 pos ) : void

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

비공개 메소드들

메소드 설명
Grid ( int x, int y ) : UInt16

Returns the grid at the relative position with bounds checking

메소드 상세

Draw() 공개 메소드

public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

LoadContent() 공개 메소드

Loading the textures
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager The manager handling the textures
리턴 void

Map() 공개 메소드

public Map ( ) : System
리턴 System

drawOnMap() 공개 메소드

Renders a texture onto the map using the given spritebatch and map position
public drawOnMap ( SpriteBatch batch, Microsoft.Xna.Framework.Graphics.Texture2D tex, Vector2 pos ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch to render the texture
tex Microsoft.Xna.Framework.Graphics.Texture2D Texture we want to render
pos Vector2
리턴 void

screenToWorld() 공개 메소드

Returns the world position relative to the screen position given
public screenToWorld ( Vector2 pos ) : Vector2
pos Vector2 The screen position
리턴 Vector2

setViewPos() 공개 메소드

Center the screen on the given world coordinate
public setViewPos ( Vector2 pos ) : void
pos Vector2 World Coordinate
리턴 void

worldToScreen() 공개 메소드

Returns the screen position matching the given world position
public worldToScreen ( Vector2 pos ) : Vector2
pos Vector2 world position
리턴 Vector2

프로퍼티 상세

center 공개적으로 프로퍼티

public Vector2 center
리턴 Vector2