public void setSpriteBox(SpriteBox.SpriteBoxName spriteBox, SpriteBatchNodeManager mSbManager) { SpriteBox sprBox = (SpriteBox)SpriteBoxManager.find(spriteBox); Debug.Assert(sprBox != null); Debug.Assert(mSbManager != null); this.cSpriteBase = sprBox; this.cSBNodeMan = mSbManager; }
public SpriteBatchNode add(SpriteBox.SpriteBoxName mSpriteBoxName) { SpriteBatchNode nodeAdded = (SpriteBatchNode)this.genericAdd(); Debug.Assert(nodeAdded != null); nodeAdded.setSpriteBox(mSpriteBoxName, this); return nodeAdded; }
public static SpriteBox add(SpriteBox.SpriteBoxName sbName, Azul.Rect sbRect) { SpriteBoxManager spriteBoxMInstance = SpriteBoxManager.getSingletonInstance(); Debug.Assert(spriteBoxMInstance != null); SpriteBox nodeAdded = (SpriteBox)spriteBoxMInstance.genericAdd(); Debug.Assert(nodeAdded != null); //set the attributes of the SpriteBox node nodeAdded.setAll(sbName, sbRect); return(nodeAdded); }
public static SpriteBox find(SpriteBox.SpriteBoxName sbName) { SpriteBoxManager spriteBoxMInstance = SpriteBoxManager.getSingletonInstance(); Debug.Assert(spriteBoxMInstance != null); SpriteBox pseudoSb = new SpriteBox(); pseudoSb.cSpriteBoxName = sbName; Debug.Assert(spriteBoxMInstance != null); SpriteBox targetSb = (SpriteBox)spriteBoxMInstance.genericFind(pseudoSb); return(targetSb); }
public void Set(SpriteBox.SpriteBoxName boxName, float x, float y, float width, float height) { Debug.Assert(cDefScreenRect != null); //Debug.Assert(cDefColor != null); Debug.Assert(this.azulSpriteBox != null); Debug.Assert(this.cSpriteBoxRect != null); this.cSpriteBoxName = boxName; // this.cSpriteBoxColor.Set(cDefColor); // this.cSpriteBoxColor.Set(cDefColor.red, cDefColor.green, cDefColor.blue); this.cSpriteBoxRect.Set(x, y, width, height); this.azulSpriteBox.Swap(this.cSpriteBoxRect, this.cSpriteBoxColor); Debug.Assert(this.azulSpriteBox != null); this.x = azulSpriteBox.x; this.y = azulSpriteBox.y; this.sx = azulSpriteBox.sx; this.sy = azulSpriteBox.sy; this.angle = azulSpriteBox.angle; }