C# Класс FontEffectsLib.SpriteTypes.GameSprite

Наследование: FontEffectsLib.CoreTypes.BaseGameObject
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_sourceRectangle Rectangle?
_texture Microsoft.Xna.Framework.Graphics.Texture2D

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

Метод Описание
CreateSolidColor ( Vector2 pos, int width, int height, Color color, GraphicsDevice gDev ) : GameSprite

Creates a GameSprite of a solid color. The tint color of the resulting object is white.

Draw ( SpriteBatch spriteBatch ) : void

Draws this GameSprite to the specified SpriteBatch.

GameSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Color tintColor ) : System

Creates a new GameSprite.

ScaleToViewport ( Viewport viewport ) : void

Scales this GameSprite based on current Viewport size.

SetCenterAsOrigin ( ) : void

Sets the center of this GameSprite as the rendering origin.

Update ( GameTime gameTime ) : void

Updates this GameSprite.

Intended to be overridden by a subclass.

Описание методов

CreateSolidColor() публичный статический Метод

Creates a GameSprite of a solid color. The tint color of the resulting object is white.
public static CreateSolidColor ( Vector2 pos, int width, int height, Color color, GraphicsDevice gDev ) : GameSprite
pos Vector2 The position of the new sprite.
width int The initial width of the new sprite.
height int The initial height of the new sprite.
color Color The color of the texture of the new sprite.
gDev GraphicsDevice The to use in the texture initialization of the new sprite.
Результат GameSprite

Draw() публичный Метод

Draws this GameSprite to the specified SpriteBatch.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The to render this to.
Результат void

GameSprite() публичный Метод

Creates a new GameSprite.
public GameSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Color tintColor ) : System
texture Microsoft.Xna.Framework.Graphics.Texture2D The image to display on the .
position Vector2
tintColor Color
Результат System

ScaleToViewport() публичный Метод

Scales this GameSprite based on current Viewport size.
public ScaleToViewport ( Viewport viewport ) : void
viewport Microsoft.Xna.Framework.Graphics.Viewport Current
Результат void

SetCenterAsOrigin() публичный Метод

Sets the center of this GameSprite as the rendering origin.
public SetCenterAsOrigin ( ) : void
Результат void

Update() публичный Метод

Updates this GameSprite.
Intended to be overridden by a subclass.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime A snapshot of the game timing state values.
Результат void

Описание свойств

_sourceRectangle защищенное свойство

protected Rectangle? _sourceRectangle
Результат Rectangle?

_texture защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics _texture
Результат Microsoft.Xna.Framework.Graphics.Texture2D