C# 클래스 WarTornLands.Infrastructure.ResolutionIndependence.MagicSprite

A magic sprite is a texture with a fix position on the screen, beeing drawn in the right spot depending on the current solution. It is not affected by the camera.
파일 보기 프로젝트 열기: floAr/WarTornLands 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( ) : void
MagicSprite ( SpriteBatch sb, Microsoft.Xna.Framework.Graphics.Texture2D sprite, Vector2 relPosition, float relWidth, float relHeight, float Xpan, float Ypan ) : System

Initializes a new instance of the MagicSprite class. It is possible to pass null for either relWidth or relHeight. In this case the respective other value is calculated in respect to the sprites aspect ratio to ensure a non-warped presentation.

비공개 메소드들

메소드 설명
CheckOverride ( ) : void
GetDrawingRec ( ) : void

메소드 상세

Draw() 공개 메소드

public Draw ( ) : void
리턴 void

MagicSprite() 공개 메소드

Initializes a new instance of the MagicSprite class. It is possible to pass null for either relWidth or relHeight. In this case the respective other value is calculated in respect to the sprites aspect ratio to ensure a non-warped presentation.
Sprite dimensions not specified. Called in case both width and height are passed as null.
public MagicSprite ( SpriteBatch sb, Microsoft.Xna.Framework.Graphics.Texture2D sprite, Vector2 relPosition, float relWidth, float relHeight, float Xpan, float Ypan ) : System
sb Microsoft.Xna.Framework.Graphics.SpriteBatch The SpriteBatch used to draw the sprite.
sprite Microsoft.Xna.Framework.Graphics.Texture2D The sprite texture.
relPosition Vector2 The relative position.
relWidth float The relative width.
relHeight float The relative height.
Xpan float The pan in X-direction.
Ypan float The pan in Y-direction.
리턴 System