using System; using System.Diagnostics; namespace SpaceInvaders { public abstract class SpriteBase : DLink { //------------------------------------------------------------------- // FIELDS //------------------------------------------------------------------- //set of colors used by sprites? public static Azul.Color pRed = new Azul.Color(0.9019f, 0.0784f, 0.0784f, 1.0f); public static Azul.Color pGreen = new Azul.Color(0.1137f, 0.8196f, 0.2667f, 1.0f); public static Azul.Color pYellow = new Azul.Color(1.0f, 1.0f, 0.0f, 1.0f); public static Azul.Color pWhite = new Azul.Color(1.0f, 1.0f, 1.0f, 1.0f); //back pointer for remove private SpriteNode pBackSpriteNode; //------------------------------------------------------------------- // CONSTRUCTION //------------------------------------------------------------------- public SpriteBase() : base() { this.pBackSpriteNode = null; } //------------------------------------------------------------------- // PUBLIC METHODS //------------------------------------------------------------------- public void SetSpriteNode(SpriteNode pSpriteNode) { Debug.Assert(pSpriteNode != null); this.pBackSpriteNode = pSpriteNode; } public SpriteNode GetSpriteNode() { Debug.Assert(this.pBackSpriteNode != null); return this.pBackSpriteNode; } //------------------------------------------------------------------- // ABSTRACT METHODS //------------------------------------------------------------------- public abstract void Update(); public abstract void Render(); } //end class } //end namespace