Ejemplo n.º 1
0
        public virtual bool GetAdditionalAttributes(XmlElement node)
        {
            try
            {
                mName           = node["Name"].InnerXml;
                mSpritefilename = node["SpriteSource"].InnerXml;
                layer           = int.Parse(node["Layer"].InnerXml);

                XmlNodeList tNode = node["Transform"].ChildNodes;

                int x = int.Parse(tNode[0].Attributes["PosX"].Value);
                int y = int.Parse(tNode[0].Attributes["PosY"].Value);

                int scaleX = int.Parse(tNode[1].Attributes["ScaleX"].Value);
                int scaleY = int.Parse(tNode[1].Attributes["ScaleY"].Value);

                transform = new Objects.Transform(x, y, scaleX, scaleY);
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 2
0
        public Object(string objectName, string spriteFilename)
        {
            mName           = objectName;
            mType           = Objects.ObjectDictionary_Moveable.OBJECT;
            mSpritefilename = spriteFilename;

            transform = new Objects.Transform();
            Source    = new BitmapImage(new Uri(mSpritefilename));
        }
Ejemplo n.º 3
0
        public Object(Object cpy)
        {
            mName           = cpy.Name;
            mType           = Objects.ObjectDictionary_Moveable.OBJECT;
            mSpritefilename = cpy.Sprite_filename;
            transform       = new Objects.Transform();

            Source = new BitmapImage(new Uri(mSpritefilename));
        }
Ejemplo n.º 4
0
 /* +==============================================+ */
 public Object()
 {
     mType     = Objects.ObjectDictionary_Moveable.OBJECT;
     transform = new Objects.Transform();
 }