//-------------------------------------------------------------------- // Methods //-------------------------------------------------------------------- public void Set(GameSprite.Name name) { this.name = Name.Proxy; this.x = 0.0f; this.y = 0.0f; this.sx = 1.0f; this.sy = 1.0f; this.pSprite = GameSpriteManager.Find(name); Debug.Assert(this.pSprite != null); }
//---------------------------------------------------------------------------------- // Constructor //---------------------------------------------------------------------------------- public AnimationSprite(GameSprite.Name theName, AlienGrid ag) { this.pSprite = GameSpriteManager.Find(theName); Debug.Assert(this.pSprite != null); this.pCurrentImage = null; this.poFirstImage = null; this.pAlienGrid = ag; }
public ProxySprite(GameSprite.Name theName) : base() { this.name = ProxySprite.Name.Proxy; this.x = 0.0f; this.y = 0.0f; this.sx = 1.0f; this.sy = 1.0f; this.pSprite = GameSpriteManager.Find(theName); Debug.Assert(this.pSprite != null); }
public AnimationSprite(GameSprite.Name spriteName) { // initialized the sprite animation is attached to this.pSprite = GameSpriteManager.Find(spriteName); Debug.Assert(this.pSprite != null); // initialize references this.pCurrImage = null; // list this.poFirstImage = null; }
//--------------------------------------------------------------------------------------------------------- // Methods //--------------------------------------------------------------------------------------------------------- public ProxySprite(GameSprite.Name name, float posX = 0.0f, float posY = 0.0f) { this.name = ProxySprite.Name.Proxy; this.x = posX; this.y = posY; this.sx = 1.0f; this.sy = 1.0f; this.pSprite = GameSpriteManager.Find(name); Debug.Assert(this.pSprite != null); }
//set the name of this proxy and attach sprite; public void Set(GameSprite.Name name) { //todo find a better naming convention if (name == GameSprite.Name.NullObject) { this.name = ProxySprite.Name.NullObject; } else { this.name = ProxySprite.Name.Proxy; } this.x = 0.0f; this.y = 0.0f; this.sx = 1.0f; this.sy = 1.0f; this.pSprite = GameSpriteManager.Find(name); Debug.Assert(this.pSprite != null); }