Inheritance: XmlObjectNode
コード例 #1
0
        public override bool Equals(System.Object obj)
        {
            XmlSpriteReference r = obj as XmlSpriteReference;

            if ((object)r == null)
            {
                return(false);
            }

            return(this.Equals(r));
        }
コード例 #2
0
        private static string GetSpriteReferenceString(XmlSpriteReference xmlSpriteReference)
        {
            var sprite = xmlSpriteReference.Sprite;
            var count = 0;

            foreach (var tempSprite in XmlParserTempProjectHelper.Program.SpriteList.Sprites)
            {
                count++;
                if (tempSprite == sprite)
                    break;
            }

            foreach (var tempSprite in XmlParserTempProjectHelper.Program.SpriteList.Sprites)
                foreach (var script in tempSprite.Scripts.Scripts)
                    foreach (var brick in script.Bricks.Bricks)
                    {
                        if (brick is XmlPointToBrick)
                        {
                            var pointToBrick = brick as XmlPointToBrick;
                            if ((pointToBrick.PointedXmlSpriteReference == xmlSpriteReference) && (count == 1))
                                return "../../../../../../object";
                            else if (pointToBrick.PointedXmlSpriteReference == xmlSpriteReference)
                                return "../../../../../../object[" + count + "]";
                        }
                    }

            foreach (var entry in XmlParserTempProjectHelper.Program.VariableList.ObjectVariableList.ObjectVariableEntries)
            {
                if(( entry.XmlSpriteReference == xmlSpriteReference ) && (count == 1))
                    return "../../../../objectList/object";
                else if (entry.XmlSpriteReference == xmlSpriteReference)
                    return "../../../../objectList/object[" + count + "]";
            }

            return "";
        }
コード例 #3
0
 public bool Equals(XmlSpriteReference r)
 {
     return _reference.Equals(r._reference);// && Sprite.Equals(r.Sprite); - would need a whole instantiated programme
 }
コード例 #4
0
 public bool Equals(XmlSpriteReference r)
 {
     return(_reference.Equals(r._reference));// && Sprite.Equals(r.Sprite); - would need a whole instantiated programme
 }