Created
June 19, 2014 04:03
-
-
Save nitrobin/de3dabeff3a05df05aad to your computer and use it in GitHub Desktop.
Consts for all assets IDs (openfl template).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
// Consts for all assets IDs (openfl template). | |
// Copy to '%PROJECT_DIR%/templates/haxe/AssetId.hx' | |
// Add entry '<template path="templates"/>' to 'project.xml' | |
// Add "%EXPORT_DIR%/flash/haxe" as sources dir for IDE code completion | |
// Using in code: openfl.Assets.getText(AssetId.assets_data_txt) | |
// openfl.Assets.getBitmapData(AssetId.images_logo_png) | |
class AssetId { | |
// Auto-generated content begin: | |
::if (assets != null)::::foreach assets::public static inline var ::flatName:: = "::id::"; | |
::end::::end:: | |
public static function getAllIds(){ | |
return [ | |
::if (assets != null)::::foreach assets::::flatName::, | |
::end::::end:: | |
]; | |
} | |
// Auto-generated content end; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment