C# Class Sphere.Core.Entity

A representation of an entity.
Inheritance: IDisposable
Show file Open project: Radnen/spherestudio

Public Methods

Method Description
Copy ( ) : Entity

Creates a perfect copy of this entity.

Dispose ( ) : void

Dispose and close this object.

Draw ( Graphics g, int tileWidth, int tileHeight, Point &offset, int zoom ) : void

Draws this Entity onto a System.Drawing.Graphics object.

Entity ( BinaryReader stream ) : System

Creates a new entity that was embedded next in the stream

Entity ( EntityType type ) : System

Creates a new Entity with the supplied type.

FigureOutName ( List others ) : void

Used along with a list of others, it makes a unique name for this entity.

GetSSImage ( string rootpath ) : Image

Get an image representation of this trigger / person

GetSpriteDirections ( string rootpath ) : string[]

Gets a list of sprite directions fgor this person object:

Save ( BinaryWriter binwrite ) : void

Saves the entity, embedding it into a file stream.

Private Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

Copy() public method

Creates a perfect copy of this entity.
public Copy ( ) : Entity
return Entity

Dispose() public method

Dispose and close this object.
public Dispose ( ) : void
return void

Draw() public method

Draws this Entity onto a System.Drawing.Graphics object.
public Draw ( Graphics g, int tileWidth, int tileHeight, Point &offset, int zoom ) : void
g System.Drawing.Graphics The System.Drawing.Graphics object to use.
tileWidth int The tile width for the map.
tileHeight int The tile height for the map.
offset Point The x/y offset to draw at.
zoom int The zoom factor of the map.
return void

Entity() public method

Creates a new entity that was embedded next in the stream
public Entity ( BinaryReader stream ) : System
stream System.IO.BinaryReader The System.IO.BinaryReader to use.
return System

Entity() public method

Creates a new Entity with the supplied type.
public Entity ( EntityType type ) : System
type EntityType The Entity.EntityType to use.
return System

FigureOutName() public method

Used along with a list of others, it makes a unique name for this entity.
public FigureOutName ( List others ) : void
others List A List of other types
return void

GetSSImage() public method

Get an image representation of this trigger / person
public GetSSImage ( string rootpath ) : Image
rootpath string The root path of the project to find the spriteset.
return Image

GetSpriteDirections() public method

Gets a list of sprite directions fgor this person object:
public GetSpriteDirections ( string rootpath ) : string[]
rootpath string The root path to find the spriteset with.
return string[]

Save() public method

Saves the entity, embedding it into a file stream.
public Save ( BinaryWriter binwrite ) : void
binwrite System.IO.BinaryWriter The System.IO.BinaryWriter to use.
return void