コード例 #1
0
        public void AddSpriteFramesWithFile(Stream plist, CCTexture2D pobTexture)
        {
            PlistDocument document = new PlistDocument();

            try
            {
                document.LoadFromXmlFile(plist);
            }
            catch (Exception)
            {
                throw (new Microsoft.Xna.Framework.Content.ContentLoadException("Failed to load the particle definition file from stream"));
            }

            PlistDictionary dict = document.Root.AsDictionary;

            AddSpriteFramesWithDictionary(dict, pobTexture);
        }
コード例 #2
0
        public void InitWithStream(Stream stream, CCTexture2D texture)
        {
            var document = new PlistDocument();

            try
            {
                document.LoadFromXmlFile(stream);
            }
            catch (Exception)
            {
                throw (new Microsoft.Xna.Framework.Content.ContentLoadException("Failed to load the sprite sheet definition file from stream"));
            }

            PlistDictionary dict = document.Root.AsDictionary;

            InitWithDictionary(dict, texture);
        }