//---------------------------------------------------------------------------------- // Methods //---------------------------------------------------------------------------------- public void Set(Glyph.Name theName, int key, Texture.Name textName, float x, float y, float width, float height) { this.name = theName; this.pTexture = TextureManager.Find(textName); Debug.Assert(this.pTexture != null); Debug.Assert(this.pSubRect != null); this.pSubRect.Set(x, y, width, height); this.key = key; }
public void Set(FontName fontName, int key, TextureName textureName, float x, float y, float w, float h) { Debug.Assert(this.pAzulRect != null); this.name = fontName; this.pTexture = TextureManager.Find(textureName); Debug.Assert(pTexture != null); this.pAzulRect.Set(x, y, w, h); this.key = key; }
public static Image Add(Image.Name imageName, Texture.Name TextureName, float x, float y, float width, float height) { ImageManager pMan = ImageManager.PrivGetInstance(); Debug.Assert(pMan != null); Image pNode = (Image)pMan.BaseAdd(); Debug.Assert(pNode != null); Texture pTexture = TextureManager.Find(TextureName); Debug.Assert(pTexture != null); pNode.Set(imageName, pTexture, x, y, width, height); return(pNode); }
//---------------------------------------------------------------------- // 4 Wrapper methods: baseAdd, baseFind, baseRemove, baseDump //---------------------------------------------------------------------- public static Image Add(Image.Name imageName, Texture.Name textName, float x, float y, float width, float height) { ImageManager pMan = privGetInstance(); Debug.Assert(pMan != null); Texture pTexture = TextureManager.Find(textName); Debug.Assert(pTexture != null); Image pNode = (Image)pMan.baseAddToFront(); Debug.Assert(pNode != null); //set the data pNode.Set(imageName, pTexture, x, y, width, height); return(pNode); }
public static Image Add(Image.Name name, Texture.Name textureName, float x, float y, float width, float height) { ImageManager pInstance = ImageManager.PrivGetInstance(); Debug.Assert(pInstance != null); Image pImage = (Image)pInstance.BaseAdd(); Debug.Assert(pImage != null); Texture pTexture = TextureManager.Find(textureName); Debug.Assert(pTexture != null); // Initialize the date pImage.Set(name, pTexture, x, y, width, height); return(pImage); }
public static Image Add(Image.Name imgName, Texture.Name textName, float x, float y, float width, float height) { ImageManager pImgManager = ImageManager.privGetInstance(); Debug.Assert(pImgManager != null); // grab an blank imgage node Image pImgNode = (Image)pImgManager.baseAdd(); Debug.Assert(pImgNode != null); // find the corresponding texture pointer Texture pTexture = TextureManager.Find(textName); Debug.Assert(pTexture != null); //configure the image node pImgNode.Set(imgName, pTexture, x, y, width, height); return(pImgNode); }
public void Set(Name name) { Azul.Rect imageRect = null; Texture texture = null; switch (name) { case Name.ShieldBrick: imageRect = Constants.shieldBrickRect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.Ship: imageRect = Constants.shipRect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.Missile: imageRect = Constants.missileRect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.ShipDeath1: imageRect = Constants.shipDeathRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.ShipDeath2: imageRect = Constants.shipDeathRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.SmallInvader1: imageRect = Constants.smallInvaderRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.SmallInvader2: imageRect = Constants.smallInvaderRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.MediumInvader1: imageRect = Constants.mediumInvaderRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.MediumInvader2: imageRect = Constants.mediumInvaderRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.LargeInvader1: imageRect = Constants.largeInvaderRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.LargeInvader2: imageRect = Constants.largeInvaderRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.UFO: imageRect = Constants.UFORect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.InvaderDeath1: imageRect = Constants.invaderDeathRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.InvaderDeath2: imageRect = Constants.invaderDeathRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.UFODeath: imageRect = Constants.UFODeathRect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombPlain: imageRect = Constants.bombPlainRect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombZigZag1: imageRect = Constants.bombZigZagRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombZigZag2: imageRect = Constants.bombZigZagRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombZigZag3: imageRect = Constants.bombZigZagRect3; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombZigZag4: imageRect = Constants.bombZigZagRect4; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombDagger1: imageRect = Constants.bombDaggerRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombDagger2: imageRect = Constants.bombDaggerRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombDagger3: imageRect = Constants.bombDaggerRect3; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombDagger4: imageRect = Constants.bombDaggerRect4; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombRolling1: imageRect = Constants.bombRollingRect1; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombRolling2: imageRect = Constants.bombRollingRect2; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombRolling3: imageRect = Constants.bombRollingRect3; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.BombDeath: imageRect = Constants.bombDeathRect; texture = TextureManager.Find(Texture.Name.Invader); break; case Name.Uninitialized: imageRect = Constants.uninitializedRect; texture = TextureManager.Find(Texture.Name.Uninitialized); break; case Name.NullObject: imageRect = Constants.uninitializedRect; texture = TextureManager.Find(Texture.Name.NullObject); break; default: Debug.Assert(false, "Invalid texture name"); break; } Debug.Assert(texture != null); this.pTexture = texture; Debug.Assert(imageRect != null); this.poImageRect = new Azul.Rect(imageRect); Debug.Assert(poImageRect != null); this.name = name; }
public void Set(ImageName imgName, TextureName textName, float x, float y, float width, float height) { this.name = imgName; this.pRect.Set(x, y, width, height); this.pTexture = TextureManager.Find(textName); }