Skip to content
Browse files

Adding in the new PBE namespace so users of PBE aren't confused by me…

…thods we don't actually want to support or exposed in the API.
  • Loading branch information...
1 parent 5ab4ed6 commit 11aa76863dce7afe6b5c6beaff1b680814c71090 @natebeck natebeck committed Dec 23, 2010
Showing with 14 additions and 3 deletions.
  1. +4 −0 src/com/pblabs/engine/ns_pbe.as
  2. +10 −3 src/com/pblabs/engine/resource/ResourceManager.as
View
4 src/com/pblabs/engine/ns_pbe.as
@@ -0,0 +1,4 @@
+package com.pblabs.engine
+{
+ public namespace ns_pbe = "http://www.pblabs.com/2010";
+}
View
13 src/com/pblabs/engine/resource/ResourceManager.as
@@ -11,13 +11,14 @@ package com.pblabs.engine.resource
import com.pblabs.engine.PBE;
import com.pblabs.engine.PBUtil;
import com.pblabs.engine.debug.Logger;
+ import com.pblabs.engine.ns_pbe;
import com.pblabs.engine.resource.provider.EmbeddedResourceProvider;
import com.pblabs.engine.resource.provider.FallbackResourceProvider;
import com.pblabs.engine.resource.provider.IResourceProvider;
import com.pblabs.engine.serialization.TypeUtility;
import flash.events.Event;
- import flash.utils.Dictionary;
+ import flash.utils.Dictionary;
/**
* The resource manager handles all tasks related to using asset files (images, xml, etc)
@@ -39,7 +40,7 @@ package com.pblabs.engine.resource
* as via a dialog box ;). Passed the filename of the requested resource.
*/
public var onEmbeddedFail:Function;
-
+
/**
* Loads a resource from a file. If the resource has already been loaded or is embedded, a
* reference to the existing resource will be given. The resource is not returned directly
@@ -240,7 +241,7 @@ package com.pblabs.engine.resource
var resourceIdentifier:String = filename.toLowerCase() + resourceType;
return _resources[resourceIdentifier];
}
-
+
/**
* Properly mark a resource as failed-to-load.
*/
@@ -263,5 +264,11 @@ package com.pblabs.engine.resource
* List of resource providers used to get resources.
*/
private var resourceProviders:Array = new Array();
+
+ /*** Helper methods for PBE not externally exposed ***/
+ ns_pbe function getResources():Dictionary
+ {
+ return _resources;
+ }
}
}

0 comments on commit 11aa768

Please sign in to comment.
Something went wrong with that request. Please try again.