Permalink
Browse files

加入多种metadata支持

  • Loading branch information...
1 parent 12b72d0 commit d824d10471ebdc7eaa7573bfa9b9e44cbc009208 @zrong committed Sep 2, 2013
Showing with 49 additions and 0 deletions.
  1. +49 −0 src/org/zengrong/display/spritesheet/SpriteSheetMetadataType.as
@@ -14,5 +14,54 @@ public class SpriteSheetMetadataType
public static const JSON:String = 'json';
public static const BINARY:String = 'binary';
public static const TXT:String = 'txt';
+ public static const PLIST:String = 'plist';
+
+ /**
+ * SpriteSheetEditor的原生格式,存储为XML
+ */
+ public static const SSE_XML:String = "ssexml";
+
+ /**
+ * SpriteSheetEditor的原生格式,存储为JSON
+ */
+ public static const SSE_JSON:String = "ssejson";
+
+ /**
+ * SpriteSheetEditor的原生格式,存储为TXT
+ */
+ public static const SSE_TXT:String = "ssetxt";
+
+ /**
+ * Starling格式
+ */
+ public static const STARLING:String = "starling";
+
+ /**
+ * Cocos2d格式
+ */
+ public static const COCOS2D:String = "cocos2d";
+
+ public static function getTypeExt($typeName:String):String
+ {
+ switch($typeName)
+ {
+ case SSE_XML:
+ return XML;
+ break;
+ case SSE_JSON:
+ return JSON;
+ break;
+ case SSE_TXT:
+ return TXT;
+ break;
+ case STARLING:
+ return XML;
+ break;
+ case COCOS2D:
+ return PLIST;
+ break;
+ }
+ return null;
+ }
}
}

0 comments on commit d824d10

Please sign in to comment.