BBGamelib.CCSpriteFrameCache.addSpriteFramesWithFile C# (CSharp) Method

addSpriteFramesWithFile() public method

public addSpriteFramesWithFile ( string path ) : void
path string
return void
		public void addSpriteFramesWithFile(string path){
			string ext = Path.GetExtension (path);
			if(ext!=null && ext.Length>0)
				path = path.Replace (ext, "");
			if (_loadedFilenames.Contains (path)){
				CCDebug.Info ("cocos2d: CCSpriteFrameCache: file already loaded: {0}", path);
				return;
			}else 
				_loadedFilenames.Add (path);
            
			string cfgPath = path;
			if(!cfgPath.EndsWith("-tp"))
				cfgPath += "-tp.txt";
			NSDictionary dict = NSDictionary.DictionaryWithContentsOfFileFromResources(cfgPath);

			string texturePath = path;
			Sprite[] sprites = Resources.LoadAll<Sprite> (texturePath);
			addSpriteFrames(dict, sprites);
		}