public static Glyph Add(Glyph.Name name, int key, Texture.TextureName textName, float x, float y, float width, float height)
        {
            GlyphManager pMan = GlyphManager.getSingleton();

            Glyph pNode = (Glyph)pMan.genericAdd();

            Debug.Assert(pNode != null);

            pNode.setAll(name, key, textName, x, y, width, height);
            return(pNode);
        }
Exemple #2
0
        public void setAll(Glyph.Name name, int key, Texture.TextureName textName, float x, float y, float width, float height)
        {
            Debug.Assert(this.glyphRect != null);
            this.glyphName = name;

            this.glyphTex = TextureManager.find(textName);
            Debug.Assert(this.glyphTex != null);

            this.glyphRect.Set(x, y, width, height);

            this.key = key;
        }
        public static Texture add(Texture.TextureName texureName, string azulTex)
        {
            TextureManager texManInst = TextureManager.getSingletonInstance();

            Debug.Assert(texManInst != null);
            Texture nodeAdded = (Texture)texManInst.genericAdd();

            Debug.Assert(nodeAdded != null);
            //set the attributes of the Image node

            nodeAdded.setAll(texureName, azulTex);

            return(nodeAdded);
        }
        public static Texture find(Texture.TextureName texName)
        {
            TextureManager texManInst = TextureManager.getSingletonInstance();

            Debug.Assert(texManInst != null);
            Texture pseudoTex = cTextureRef;

            Debug.Assert(pseudoTex != null);

            pseudoTex.setTextureName(texName);

            Texture targetTex = (Texture)texManInst.genericFind(pseudoTex);

            return(targetTex);
        }
        //Converts the character in XML to class Character
        public static void addXml(Glyph.Name glyphName, String assetName, Texture.TextureName textName)
        {
            Character     c;
            XmlSerializer serializer = new XmlSerializer(typeof(Character));
            XmlTextReader file       = new XmlTextReader(assetName);

            while (file.Read())
            {
                if (file.GetAttribute("key") != null)
                {
                    c = (Character)serializer.Deserialize(file);
                    GlyphManager.Add(glyphName, c.key, textName, c.x, c.y, c.width, c.height);
                }
            }
        }
        public static Image add(Image.ImageName imageName, Texture.TextureName imageTexName, Azul.Rect imageRect)
        {
            ImageManager imgMInstance = ImageManager.getSingletonInstance();

            Debug.Assert(imgMInstance != null);

            Image nodeAdded = (Image)imgMInstance.genericAdd();

            Debug.Assert(nodeAdded != null);
            //set the attributes of the Image node

            Texture mtexture = TextureManager.find(imageTexName);

            Debug.Assert(mtexture != null);

            nodeAdded.setImageName(imageName);
            nodeAdded.setImageRect(imageRect);
            nodeAdded.setImageTexture(mtexture);

            return(nodeAdded);
        }