Packagecom.bomski.engine.textures
Classpublic class MultiTextureAtlases
InheritanceMultiTextureAtlases Inheritance starling.events.EventDispatcher
Implements IDispose

MultiTextureAtlases class This class stores textureatlases



Public Methods
 MethodDefined By
  
MultiTextureAtlases(preloader:Preloader, assetsManager:AssetsManager, xmlManager:XMLManager)
Constructor
MultiTextureAtlases
  
Create all texture atlases
MultiTextureAtlases
  
Create the next texture atlas This can be use if you have a limited device and you only want create one textureatlas every frame
MultiTextureAtlases
  
dispose():void
Free all data from an object
MultiTextureAtlases
  
getAtlas(atlasName:String):TextureAtlas
Get a textureatlas by atlas name
MultiTextureAtlases
  
Get a texture from texture atlas
MultiTextureAtlases
  
getTextureByName(atlasName:String, textureName:String):Texture
Get texture by name
MultiTextureAtlases
  
Get textures by prefix
MultiTextureAtlases
  
getTexturesByName(atlasName:String, prefix:String):Vector.<Texture>
Get textures by name
MultiTextureAtlases
  
parseTextureAtlases(atlases:XML):void
Parse the textureatlases from a xml file
MultiTextureAtlases
Constructor Detail
MultiTextureAtlases()Constructor
public function MultiTextureAtlases(preloader:Preloader, assetsManager:AssetsManager, xmlManager:XMLManager)

Constructor

Parameters
preloader:Preloader — Preloader for loading the xmls and bitmaps
 
assetsManager:AssetsManager — The assetsmanager to add the bitmaps
 
xmlManager:XMLManager — The xml to add the xmls
Method Detail
createAllTextureAtlases()method
public function createAllTextureAtlases():void

Create all texture atlases

createNextTextureAtlas()method 
public function createNextTextureAtlas():void

Create the next texture atlas This can be use if you have a limited device and you only want create one textureatlas every frame

dispose()method 
public function dispose():void

Free all data from an object

getAtlas()method 
public function getAtlas(atlasName:String):TextureAtlas

Get a textureatlas by atlas name

Parameters

atlasName:String — The atlas name

Returns
TextureAtlas — A textureAtlas or null if not atlas with this name exist
getTexture()method 
public function getTexture(texture:MultiTextureAtlasTexture):Texture

Get a texture from texture atlas

Parameters

texture:MultiTextureAtlasTexture — A object which identify the texture in the textureatlases

Returns
Texture — A texture or null if the texture can not be found
getTextureByName()method 
public function getTextureByName(atlasName:String, textureName:String):Texture

Get texture by name

Parameters

atlasName:String — The atlas name
 
textureName:String — The texture name in this atlas

Returns
Texture — A texture or null if not texture exist

Throws
ArgumentError — if no atlas with this atlasname exist
getTextures()method 
public function getTextures(prefix:MultiTextureAtlasTexturePrefix):Vector.<Texture>

Get textures by prefix

Parameters

prefix:MultiTextureAtlasTexturePrefix — The prefix object which identify the textures

Returns
Vector.<Texture> — A vector of textures or null if no textures found
getTexturesByName()method 
public function getTexturesByName(atlasName:String, prefix:String):Vector.<Texture>

Get textures by name

Parameters

atlasName:String — The atlas name
 
prefix:String — The prefix

Returns
Vector.<Texture> — A vector of textures or null if no textures found
parseTextureAtlases()method 
public function parseTextureAtlases(atlases:XML):void

Parse the textureatlases from a xml file

Parameters

atlases:XML