C# Class NativeUI.Sprite

Show file Open project: Guad/NativeUI Class Usage Examples

Public Properties

Property Type Description
Color Color
Heading float
Position Point
Size Size
TextureName string
Visible bool

Public Methods

Method Description
Draw ( ) : void

Draws the sprite on a 1080-pixels height base.

DrawTexture ( string path, Point position, Size size ) : void

Draw a custom texture from a file on a 1080-pixels height base.

DrawTexture ( string path, Point position, Size size, float rotation, Color color ) : void

Draw a custom texture from a file on a 1080-pixels height base.

Sprite ( string textureDict, string textureName, Point position, Size size ) : System

Creates a game sprite object from a texture dictionary and texture name.

Sprite ( string textureDict, string textureName, Point position, Size size, float heading, Color color ) : System

Creates a game sprite object from a texture dictionary and texture name.

WriteFileFromResources ( Assembly yourAssembly, string fullResourceName ) : string

Save an embedded resource to a temporary file.

WriteFileFromResources ( Assembly yourAssembly, string fullResourceName, string savePath ) : string

Save an embedded resource to a concrete path.

Method Details

Draw() public method

Draws the sprite on a 1080-pixels height base.
public Draw ( ) : void
return void

DrawTexture() public static method

Draw a custom texture from a file on a 1080-pixels height base.
public static DrawTexture ( string path, Point position, Size size ) : void
path string Path to texture file.
position Point
size System.Drawing.Size
return void

DrawTexture() public static method

Draw a custom texture from a file on a 1080-pixels height base.
public static DrawTexture ( string path, Point position, Size size, float rotation, Color color ) : void
path string Path to texture file.
position Point
size Size
rotation float
color Color
return void

Sprite() public method

Creates a game sprite object from a texture dictionary and texture name.
public Sprite ( string textureDict, string textureName, Point position, Size size ) : System
textureDict string
textureName string
position Point
size Size
return System

Sprite() public method

Creates a game sprite object from a texture dictionary and texture name.
public Sprite ( string textureDict, string textureName, Point position, Size size, float heading, Color color ) : System
textureDict string
textureName string
position Point
size Size
heading float
color Color
return System

WriteFileFromResources() public static method

Save an embedded resource to a temporary file.
public static WriteFileFromResources ( Assembly yourAssembly, string fullResourceName ) : string
yourAssembly Assembly Your executing assembly.
fullResourceName string Resource name including your solution name. E.G MyMenuMod.banner.png
return string

WriteFileFromResources() public static method

Save an embedded resource to a concrete path.
public static WriteFileFromResources ( Assembly yourAssembly, string fullResourceName, string savePath ) : string
yourAssembly Assembly Your executing assembly.
fullResourceName string Resource name including your solution name. E.G MyMenuMod.banner.png
savePath string Path to where save the file, including the filename.
return string

Property Details

Color public property

public Color Color
return Color

Heading public property

public float Heading
return float

Position public property

public Point Position
return Point

Size public property

public Size Size
return Size

TextureName public property

public string TextureName
return string

Visible public property

public bool Visible
return bool