C# (CSharp) GameEngine.Drawing Namespace

Nested Namespaces

GameEngine.Drawing.Bitmap
GameEngine.Drawing.Text

Сlasses

Name Description
DrawableInstance
DrawableSet A DrawableSet is a collection of IGameDrawable instances (each called a GameDrawableInstance), organised in a first-tier group of STATES. Whenever a STATE (e.g. Running, Walking) is given to a DrawableSet, it will return a list of all the GameDrawableInstances that were stored under that STATE. This provides a very quick and easy way of being able to retrieve items which are related at one go so that they may be drawn together on the screen. Optionally, a second tier grouping mechanism is given by exposing a GROUP variable in each GameDrawableInstance. This second tier grouping mechanism allows for items related to each other, but not necisseraly stored under the same STATE, to have their values set at one go in a batch operation. GameDrawableInstances are important becuase they allow draw options to be set per Entity Drawable, without effecting the draw state of other Entities using the same drawable item. For this reason, properties such as Visibility, Layer, Rotation, Color and SpriteEffects to use are all stored in a GameDrawableInstance rather than an IGameDrawable item. A very brief diagram showing the overview of this structure can be seen below: GameDrawableSet -----> [ STATE0 ] ------> {GameDrawableInstance1, GameDrawableInstance2, ..., GameDrawableInstanceN} -----> [ STATE1 ] ------> ... -----> ... -----> [ STATEN ] ------> ... Similiarly, the same applies for storing by GROUP. The access times of both these allocations is constant O(1) time due to the use of seperate dictionaries. GameDrawableInstance -------> {IGameDrawable, Visible, Rotation, Color, SpriteEffects, Layer }
FRectangle Rectangle Structure that uses Float values as storage rather than integers such as the ones used in the standard XNA rectangle struct. The FRectangle structure can be used to specify texture ranges in for example the ground pallette.