I would like to know if an object can be combined with an instance name.
I got:
class AnimatedEntity : DrawableEntity { Animation BL { get; set; } Animation BR { get; set; } Animation TL { get; set; } Animation TR { get; set; } Animation T { get; set; } Animation R { get; set; } Animation L { get; set; } Animation B { get; set; } Orientation orientation ; public virtual int Draw(SpriteBatch spriteBatch, GameTime gameTime) {
and
enum Orientation { SE, SO, NE, NO, N , E, O, S, BL, BR, TL, TR, T, R, L, B }
If Orientation is an Enum and Animation class.
Is it possible to call the correct animation from Orientation with the same name?
source share