public AlienGO(GameObject.Name gameName, GameSprite.Name spriteName, GameSprite.Name expSpriteName, int points, float x, float y) : base(gameName, spriteName) { this.x = x; this.y = y; this.delta = 1.0f; this.points = points; this.pExplosion = ProxySpriteManager.Add(expSpriteName); }
//---------------------------------------------------------------------------------- // Set Methods //---------------------------------------------------------------------------------- public void Set(GameObject.Name gameName, GameSprite.Name spriteName, float px = 0.0f, float py = 0.0f) { this.name = gameName; this.x = px; this.y = py; this.pProxySprite = ProxySpriteManager.Add(spriteName); this.poCollObj = new CollisionObj(this.pProxySprite); Debug.Assert(this.poCollObj != null); this.bMarkForDeath = false; }
//SpriteNode pBackPointer; public ExplosionSprite(GameSprite.Name spriteName, float px, float py) : base() { // finds the ProxySprite and returns a reference to it. // the sprite base of the proxy sprite has a back pointer to its spritenode this.pProxySprite = ProxySpriteManager.Add(spriteName); this.pProxySprite.SetCoordinates(px, py); this.pProxySprite.Update(); this.pExplosionBatch = SpriteNodeBatchManager.Find(SpriteNodeBatch.Name.Explosions); }
public GameObject(GameObject.Name gameName, GameSprite.Name spriteName) : base() { this.name = gameName; this.x = 0.0f; this.y = 0.0f; this.pProxySprite = ProxySpriteManager.Add(spriteName); this.poCollObj = new CollisionObj(this.pProxySprite); Debug.Assert(this.poCollObj != null); this.bMarkForDeath = false; }
protected GameObject(GameObjectName goName, SpriteBaseName spriteName, int idx) { this.gameObjectName = goName; this.index = idx; this.markedForDeath = false; this.x = 0.0f; this.y = 0.0f; this.pProxySprite = ProxySpriteManager.Add(spriteName); Debug.Assert(this.pProxySprite != null); this.pCollisionObject = new CollisionObject(this.pProxySprite); Debug.Assert(this.pCollisionObject != null); }
//-------------------------------------------------------------------------------------------- // Constructor //-------------------------------------------------------------------------------------------- protected GameObject(GameObject.Name gameObjectName, GameSprite.Name gameSpriteName) { this.name = gameObjectName; this.x = 0.0f; this.y = 0.0f; this.sx = 1.0f; this.sy = 1.0f; this.pProxySprite = ProxySpriteManager.Add(gameSpriteName); Debug.Assert(this.pProxySprite != null); this.pColObject = new CollisionObject(this.pProxySprite); Debug.Assert(this.pColObject != null); this.isDead = false; }
protected GameObject(GameObject.Name objName, GameSprite.Name spriteName, int _index) { this.name = objName; this.index = _index; this.x = 0.0f; this.y = 0.0f; this.markForDeath = false; //this.pProxySprite = new ProxySprite(spriteName); this.pProxySprite = ProxySpriteManager.Add(spriteName); Debug.Assert(this.pProxySprite != null); this.poColObj = new ColObject(this.pProxySprite); Debug.Assert(this.poColObj != null); }
public static void Create(int startReserveSize = 3, int refillSize = 1) { // make sure values are ressonable Debug.Assert(startReserveSize > 0); Debug.Assert(refillSize > 0); // initialize the singleton here Debug.Assert(pInstance == null); // Do the initialization if (pInstance == null) { pInstance = new ProxySpriteManager(startReserveSize, refillSize); // Add a NULL Sprite into the Manager, allows find to work without breaking; ProxySprite pPSprite = ProxySpriteManager.Add(GameSprite.Name.NullObject); Debug.Assert(pPSprite != null); } Debug.WriteLine("------ProxySprite Manager Initialized-------"); }
public void SetGameSprite(GameSprite.Name spriteName) { this.pProxySprite = ProxySpriteManager.Add(spriteName); }
// pProxy has a back pointer //public SpriteNodeManager pBackPointer_SpriteNodeManager; public ExplosionSprite(GameSprite.Name spriteName) { // finds the ProxySprite and returns a reference to it. this.pProxySprite = ProxySpriteManager.Add(spriteName); }