Managers Extension: My new project

  ... the case you feel the need for a new feature or want to submit one.

Managers Extension: My new project

Postby gknedo » Tue Apr 30, 2013 1:54 am

Hi Community
I develop for AndEngine and all my projects I have to create all the same Managers. ResourceManager, SceneManager, GameManager, etc..
So I'm starting a project for an extension that will facilitate the management of these parts of the code. I'm posting the first version of ResourceManager, but this is not yet fully tested, so use with care. It's an alpha version that I created during my spare time of the weekend.

I'm posting this version to get some feedback from you =)

And I took the liberty to borrow (without asking) three or four assets from book "AndEngine for Android Game Developers Cookbook". If I can not use them to illustrate the use of resources in extension please notify me that I I will change the assets used. ... rExtension

Look assets/config/resourceConfig.txt to see how to set up the resource files
Look assets/config/resourceContext.txt to see how to set up the contexts

To use the ResourceManager:

Do a ResourceConfig.load() and ResourceContext.load() to load the txt files.

Use ResourceManager.enable(String context) to load the necessary resources for the context.
Use ResourceManager.disable(String context) to unload the resources that are loaded exclusively to the context.
Use ResourceManager.changeTo(ArrayList<String> context) to unload all unnecessary resources and load all necessary resources for the contexts in the array.


To use some resource, call ResourceManager.ResouceType.get(String resourceId).
Ex: To load a Sound Resource: ResourceManager.Sounds.get(String resourceId).
To load a TextureRegion call ResourceManager.Textures.get(String resourceId).
Looking for some tutorials in portuguese?
Posts: 21
Joined: Fri Oct 12, 2012 1:59 am

Return to Features

Who is online

Users browsing this forum: No registered users and 7 guests