public void Set(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pLineColor = null) { Debug.Assert(this.poBoxSprite != null); Debug.Assert(this.poLineColor != null); Debug.Assert(poScreenRect != null); BoxSprite.poScreenRect.Set(x, y, width, height); this.name = name; if (pLineColor != null) { this.poLineColor.Set(pLineColor); this.poBoxSprite.SwapColor(this.poLineColor); } this.poBoxSprite.SwapScreenRect(poScreenRect); Debug.Assert(this.poBoxSprite != null); this.x = poBoxSprite.x; this.y = poBoxSprite.y; this.sx = poBoxSprite.sx; this.sy = poBoxSprite.sy; this.angle = poBoxSprite.angle; }
//--------------------------------------------------------------------------------------------------------- // Methods //--------------------------------------------------------------------------------------------------------- public void set(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pColor) { Debug.Assert(this.poAzulBoxSprite != null); Debug.Assert(this.poAzulColor != null); Debug.Assert(psAzulRect != null); BoxSprite.psAzulRect.Set(x, y, width, height); this.name = name; if (pColor == null) { this.poAzulColor.Set(1, 1, 1); } else { this.poAzulColor.Set(pColor); } this.poAzulBoxSprite.Swap(psAzulRect, this.poAzulColor); Debug.Assert(this.poAzulBoxSprite != null); this.x = poAzulBoxSprite.x; this.y = poAzulBoxSprite.y; this.sx = poAzulBoxSprite.sx; this.sy = poAzulBoxSprite.sy; this.angle = poAzulBoxSprite.angle; }
public Missile(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY) : base(name, spriteName, boxSpriteName) { this.x = posX; this.y = posY; this.speedY = 10.0f; }
public void Set(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pLineColor) { //created in the constructor, double-check Debug.Assert(this.poAzulSpriteBox != null); Debug.Assert(this.poLineColor != null); Debug.Assert(psTempRect != null); psTempRect.Set(x, y, width, height); this.name = name; if (pLineColor == null) { this.poLineColor.Set(1, 1, 1); } else { this.poLineColor.Set(pLineColor); } this.poAzulSpriteBox.Swap(psTempRect, this.poLineColor); Debug.Assert(poAzulSpriteBox != null); this.x = poAzulSpriteBox.x; this.y = poAzulSpriteBox.y; this.sx = poAzulSpriteBox.sx; this.sy = poAzulSpriteBox.sy; this.angle = poAzulSpriteBox.angle; }
public void Set(BoxSprite.Name name, Azul.Color pLineColor = null) { Debug.Assert(this.poBoxSprite != null); Debug.Assert(this.poLineColor != null); Debug.Assert(poScreenRect != null); this.name = name; if (pLineColor == null) { this.poLineColor.Set(1, 1, 1); } else { this.poLineColor.Set(pLineColor); } this.poBoxSprite.SwapColor(this.poLineColor); Debug.Assert(this.poBoxSprite != null); this.x = poBoxSprite.x; this.y = poBoxSprite.y; this.sx = poBoxSprite.sx; this.sy = poBoxSprite.sy; this.angle = poBoxSprite.angle; }
public LargeInvader(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY) : base(name, spriteName, boxSpriteName) { this.x = posX; this.y = posY; this.value = 10; }
//--------------------------------------------------------------------------------------------------------- // Methods //--------------------------------------------------------------------------------------------------------- //public void ToggleColor() //{ // if (GameObjectMan.GetShowColBox() == true) // { // this.poLineColor.Set(this.poLineColorHolder); // } // else // { // this.poLineColor.Set(BoxSprite.psTmpColor); // } //} public void Set(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pLineColor) { Debug.Assert(this.poAzulSpriteBox != null); Debug.Assert(this.poLineColor != null); Debug.Assert(psTmpRect != null); BoxSprite.psTmpRect.Set(x, y, width, height); this.name = name; if (pLineColor == null) { this.poLineColor.Set(0, 0, 0); } else { this.poLineColor.Set(pLineColor); } //this.poLineColorHolder = poLineColor; this.poAzulSpriteBox.Swap(psTmpRect, this.poLineColor); Debug.Assert(this.poAzulSpriteBox != null); this.BaseSet(poAzulSpriteBox.x, poAzulSpriteBox.y, poAzulSpriteBox.sx, poAzulSpriteBox.sy, poAzulSpriteBox.angle); }
public WallRight(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY, float width, float height) : base(name, spriteName, boxSpriteName) { this.poColObj.poColRect.Set(posX, posY, width, height); this.x = posX; this.y = posY; }
public UFO(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY) : base(name, spriteName, boxSpriteName) { this.x = posX; this.y = posY; this.speedX = 2; this.value = 300; }
public Bomb(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY) : base(name, spriteName, boxSpriteName) { this.x = posX; this.y = posY; this.speedY = -5.0f; this.pInvaderWhoDroppedMe = null; }
public Ship(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY) : base(name, spriteName, boxSpriteName) { this.x = posX; this.y = posY; this.speedX = 5.0f; this.pMotionState = null; this.pShootState = null; }
public void Set(BoxSprite.Name name) { this.name = ProxyBoxSprite.Name.Proxy; this.x = 0.0f; this.y = 0.0f; this.pBoxSprite = BoxSpriteManager.Find(name); Debug.Assert(this.pBoxSprite != null); }
public void Set(BoxSprite.Name boxName, Azul.Rect pRect) { Debug.Assert(pRect != null); this.name = boxName; this.poBoxSprite.SwapScreenRect(pRect); this.x = poBoxSprite.x; this.y = poBoxSprite.y; this.sx = poBoxSprite.sx; this.sy = poBoxSprite.sy; this.angle = poBoxSprite.angle; }
public static BoxSprite Find(BoxSprite.Name name) { BoxSpriteMan pBSMan = BoxSpriteMan.PrivGetInstance(); Debug.Assert(pBSMan != null); pBSMan.poNodeCompare.SetName(name); BoxSprite pBSnode = (BoxSprite)pBSMan.BaseFind(pBSMan.poNodeCompare); return(pBSnode); }
public static BoxSprite Find(BoxSprite.Name name) { //ensure call Create() first BoxSpriteMan pMan = BoxSpriteMan.GetInstance(); Debug.Assert(pMan != null); pMan.poNodeForCompare.setName(name); BoxSprite pData = (BoxSprite)pMan.baseFind(pMan.poNodeForCompare); return(pData); }
public static BoxSprite Find(BoxSprite.Name name) { BoxSpriteMan pMan = BoxSpriteMan.privGetInstance(); Debug.Assert(pMan != null); pMan.poNodeCompare.SetName(name); BoxSprite pData = (BoxSprite)pMan.baseFind(pMan.poNodeCompare); return(pData); }
public static BoxSprite Find(BoxSprite.Name theName) { BoxSpriteManager pBoxMan = BoxSpriteManager.privGetInstance(); Debug.Assert(pBoxMan != null); pBoxMan.poNodeCompare.SetName(theName); BoxSprite pBoxSprite = (BoxSprite)pBoxMan.baseFind(pBoxMan.poNodeCompare); return(pBoxSprite); }
public static BoxSprite Add(BoxSprite.Name theName, float x, float y, float width, float height, Azul.Color pColor = null) { BoxSpriteManager pBoxMan = BoxSpriteManager.privGetInstance(); Debug.Assert(pBoxMan != null); BoxSprite pNode = (BoxSprite)pBoxMan.baseAdd(); Debug.Assert(pNode != null); pNode.Set(theName, x, y, width, height, pColor); return(pNode); }
public static BoxSprite Find(BoxSprite.Name name) { BoxSpriteManager pMan = BoxSpriteManager.PrivGetInstance(); Debug.Assert(pMan != null); pMan.poNodeCompare.name = name; BoxSprite pData = (BoxSprite)pMan.BaseFind(pMan.poNodeCompare); Debug.Assert(pData != null); return(pData); }
public static BoxSprite Add(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pColor = null) { BoxSpriteMan pBSMan = BoxSpriteMan.PrivGetInstance(); Debug.Assert(pBSMan != null); BoxSprite pBSnode = (BoxSprite)pBSMan.BaseAdd(); Debug.Assert(pBSnode != null); pBSnode.Set(name, x, y, width, height, pColor); return(pBSnode); }
public static BoxSprite Add(BoxSprite.Name name, Azul.Color pColor = null) { BoxSpriteManager pMan = BoxSpriteManager.PrivGetInstance(); Debug.Assert(pMan != null); BoxSprite pNode = (BoxSprite)pMan.BaseAdd(); Debug.Assert(pNode != null); pNode.Set(name, pColor); return(pNode); }
public BoxSprite GetSpriteByName(BoxSprite.Name n) { BoxSprite current = (BoxSprite)this.poActiveHead; while (current != null) { if (current.name == n) { return(current); } } return(null); }
public static BoxSprite Add(BoxSprite.Name name, Azul.Rect pRect) { BoxSpriteManager pMan = BoxSpriteManager.PrivGetInstance(); Debug.Assert(pMan != null); BoxSprite pNode = (BoxSprite)pMan.BaseAdd(); Debug.Assert(pNode != null); // Initialize the Data pNode.Set(name, pRect); return(pNode); }
protected GameObject(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName) { this.name = name; this.x = 0.0f; this.y = 0.0f; this.speedX = 0; this.speedY = 0; this.pProxySprite = new ProxySprite(spriteName); Debug.Assert(this.pProxySprite != null); this.poColObj = new ColObject(this.pProxySprite, boxSpriteName); Debug.Assert(this.poColObj != null); }
public static BoxSprite Find(BoxSprite.Name name) { BoxSpriteManager pMan = BoxSpriteManager.PrivGetInstance(); Debug.Assert(pMan != null); // So: Use the Compare Node - as a reference // use in the Compare() function pMan.poNodeCompare.SetName(name); BoxSprite pData = (BoxSprite)pMan.BaseFind(pMan.poNodeCompare); return(pData); }
public static BoxSprite Add(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pColor = null) { BoxSpriteManager pMan = BoxSpriteManager.PrivGetInstance(); Debug.Assert(pMan != null); BoxSprite pNode = (BoxSprite)pMan.BaseAdd(); Debug.Assert(pNode != null); // Initialize the Data pNode.Set(name, x, y, width, height, pColor); return(pNode); }
// TODO right now proxies are not being added to the manager public static ProxyBoxSprite Add(BoxSprite.Name name) { ProxyBoxSpriteManager pMan = ProxyBoxSpriteManager.PrivGetInstance(); Debug.Assert(pMan != null); ProxyBoxSprite pNode = (ProxyBoxSprite)pMan.BaseAdd(); Debug.Assert(pNode != null); pNode.Set(name); return(pNode); }
private void Set(BoxSprite.Name boxName, float x, float y, float width, float height) { Debug.Assert(this.poAzulSpriteBox != null); Debug.Assert(this.poLineColor != null); Debug.Assert(psTmpRect != null); BoxSprite.psTmpRect.Set(x, y, width, height); this.name = boxName; this.poAzulSpriteBox.Swap(psTmpRect, this.poLineColor); Debug.Assert(this.poAzulSpriteBox != null); this.BaseSet(poAzulSpriteBox.x, poAzulSpriteBox.y, poAzulSpriteBox.sx, poAzulSpriteBox.sy, poAzulSpriteBox.angle); }
public static BoxSprite Add(BoxSprite.Name name, float x, float y, float width, float height, Azul.Color pColor = null) { //ensure call Create() first BoxSpriteMan pMan = BoxSpriteMan.GetInstance(); Debug.Assert(pMan != null); BoxSprite pBoxSprite = (BoxSprite)pMan.baseAdd(); Debug.Assert(pBoxSprite != null); pBoxSprite.set(name, x, y, width, height, pColor); return(pBoxSprite); }
public static BoxSprite Find(BoxSprite.Name name) { BoxSpriteMan pMan = BoxSpriteMan.PrivGetInstance(); Debug.Assert(pMan != null); // Compare functions only compares two Nodes // So: Use the Compare Node - as a reference // use in the Compare() function pMan.poNodeCompare.name = name; BoxSprite pData = (BoxSprite)pMan.BaseFind(pMan.poNodeCompare); return(pData); }