C# 클래스 PlatformerPOC.Renderer

Centralized rendering and viewport implementation.
파일 보기 프로젝트 열기: bramdemoor/MonoGame-PlatformerPOC 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

Private Properties

프로퍼티 타입 설명
DrawAll void
DrawBorder void
DrawDebug void
DrawHud void
GetRelativeCoords Microsoft.Xna.Framework.Rectangle
GetRelativeCoords Vector2
GetSpriteEffects SpriteEffects
IsObjectInArea bool
IsObjectInView bool

공개 메소드들

메소드 설명
Draw ( ) : void

Single public method

GetWorldCoords ( Vector2 viewCoords ) : Vector2

Converts view coordinates into world coordinates

LoadContent ( ) : void
Renderer ( PlatformGame game ) : System
UpdateCameraPosition ( float x, GameTime gameTime ) : void

Scroll the view to a specified horizontal coordinate. Optionally, apply camera shake effect FYI V-scrolling is blocked

비공개 메소드들

메소드 설명
DrawAll ( ) : void
DrawBorder ( Rectangle rectangleToDraw, int thicknessOfBorder, Color borderColor ) : void

Will draw a border (hollow rectangle) of the given 'thicknessOfBorder' (in pixels) of the specified color. Order: Top > Left > Right > Bottom By Sean Colombo, from http://bluelinegamestudios.com/blog

DrawDebug ( ) : void
DrawHud ( ) : void
GetRelativeCoords ( Rectangle realWorldRectangle ) : Rectangle

Converts world rectangle into view rectangle

GetRelativeCoords ( Vector2 realWorldCoords ) : Vector2

Converts world coordinates into view coordinates

GetSpriteEffects ( HorizontalDirection horizontalDirection ) : SpriteEffects
IsObjectInArea ( Rectangle objectRectangle ) : bool
IsObjectInView ( BaseGameObject obj ) : bool

메소드 상세

Draw() 공개 메소드

Single public method
public Draw ( ) : void
리턴 void

GetWorldCoords() 공개 메소드

Converts view coordinates into world coordinates
public GetWorldCoords ( Vector2 viewCoords ) : Vector2
viewCoords Vector2
리턴 Vector2

LoadContent() 공개 메소드

public LoadContent ( ) : void
리턴 void

Renderer() 공개 메소드

public Renderer ( PlatformGame game ) : System
game PlatformGame
리턴 System

UpdateCameraPosition() 공개 메소드

Scroll the view to a specified horizontal coordinate. Optionally, apply camera shake effect FYI V-scrolling is blocked
public UpdateCameraPosition ( float x, GameTime gameTime ) : void
x float
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

프로퍼티 상세

spriteBatch 공개적으로 프로퍼티

public SpriteBatch,Microsoft.Xna.Framework.Graphics spriteBatch
리턴 Microsoft.Xna.Framework.Graphics.SpriteBatch