public void AddSpriteFrames(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; AddSpriteFrames(dict, pobTexture); }
public CCSpriteSheet(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); }