ソースを参照

fix for index starting at 1

ncannasse 7 年 前
コミット
97573437d2
1 ファイル変更4 行追加0 行削除
  1. 4 0
      hxd/res/Atlas.hx

+ 4 - 0
hxd/res/Atlas.hx

@@ -128,6 +128,10 @@ class Atlas extends Resource {
 				}
 				}
 				tl[index] = { t : t, width : origW, height : origH };
 				tl[index] = { t : t, width : origW, height : origH };
 			}
 			}
+			
+			// remove first element if index started at 1 instead of 0
+			for( tl in contents )
+				if( tl.length > 1 && tl[0] == null ) tl.shift();
 		}
 		}
 		return contents;
 		return contents;
 	}
 	}