C# Класс Nez.Sprites.Sprite

the most basic and common Renderable. Renders a Subtexture/Texture.
Наследование: RenderableComponent
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
spriteEffects SpriteEffects

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

Свойство Тип Описание
_origin Microsoft.Xna.Framework.Vector2
_subtexture Nez.Textures.Subtexture

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

Метод Описание
Sprite ( ) : Nez.Textures
Sprite ( Subtexture subtexture ) : Nez.Textures
Sprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Nez.Textures
drawOutline ( Graphics graphics, Camera camera, Microsoft.Xna.Framework.Color outlineColor, int offset = 1 ) : void
drawOutline ( Graphics graphics, Camera camera, int offset = 1 ) : void

Draws the Renderable with an outline. Note that this should be called on disabled Renderables since they shouldnt take part in default rendering if they need an ouline.

render ( Graphics graphics, Camera camera ) : void
setOrigin ( Vector2 origin ) : Sprite

sets the origin for the Renderable

setOriginNormalized ( Vector2 value ) : Sprite

helper for setting the origin in normalized fashion (0-1 for x and y)

setSubtexture ( Subtexture subtexture ) : Sprite

sets the Subtexture and updates the origin of the Sprite to match Subtexture.origin. If for whatever reason you need an origin different from the Subtexture either clone it or set the origin AFTER setting the Subtexture here.

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

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

public Sprite ( ) : Nez.Textures
Результат Nez.Textures

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

public Sprite ( Subtexture subtexture ) : Nez.Textures
subtexture Nez.Textures.Subtexture
Результат Nez.Textures

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

public Sprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Nez.Textures
texture Microsoft.Xna.Framework.Graphics.Texture2D
Результат Nez.Textures

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

public drawOutline ( Graphics graphics, Camera camera, Microsoft.Xna.Framework.Color outlineColor, int offset = 1 ) : void
graphics Graphics
camera Camera
outlineColor Microsoft.Xna.Framework.Color
offset int
Результат void

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

Draws the Renderable with an outline. Note that this should be called on disabled Renderables since they shouldnt take part in default rendering if they need an ouline.
public drawOutline ( Graphics graphics, Camera camera, int offset = 1 ) : void
graphics Graphics Graphics.
camera Camera Camera.
offset int Offset.
Результат void

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

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
Результат void

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

sets the origin for the Renderable
public setOrigin ( Vector2 origin ) : Sprite
origin Microsoft.Xna.Framework.Vector2 Origin.
Результат Sprite

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

helper for setting the origin in normalized fashion (0-1 for x and y)
public setOriginNormalized ( Vector2 value ) : Sprite
value Microsoft.Xna.Framework.Vector2
Результат Sprite

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

sets the Subtexture and updates the origin of the Sprite to match Subtexture.origin. If for whatever reason you need an origin different from the Subtexture either clone it or set the origin AFTER setting the Subtexture here.
public setSubtexture ( Subtexture subtexture ) : Sprite
subtexture Nez.Textures.Subtexture Subtexture.
Результат Sprite

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

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

protected Vector2,Microsoft.Xna.Framework _origin
Результат Microsoft.Xna.Framework.Vector2

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

protected Subtexture,Nez.Textures _subtexture
Результат Nez.Textures.Subtexture

spriteEffects публичное свойство

Batchers passed along to the Batcher when rendering. flipX/flipY are helpers for setting this.
public SpriteEffects spriteEffects
Результат SpriteEffects