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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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