Browse files

Added getAlias to NameManager, fixed includeIn not working for multip…

…le includeIn types in TemplateManager
  • Loading branch information...
1 parent 1baa1a4 commit f5e20112e3fa5f16375ccdca752ad2819ffdf505 @zodouglass committed Jun 18, 2012
View
10 src/com/pblabs/engine/core/NameManager.as
@@ -105,6 +105,16 @@ package com.pblabs.engine.core
_registeredAliases[object] = [];
_registeredAliases[object].push(alias);
}
+
+ /**
+ * returns the alias that is registered for an object
+ * @param object
+ * @return
+ */
+ public function getAlias(object:IPBObject):String
+ {
+ return _registeredAliases[object];
+ }
/**
* Unregister an alias for an IPBObject
View
3 src/com/pblabs/engine/core/TemplateManager.as
@@ -172,7 +172,8 @@ package com.pblabs.engine.core
//And the includeIn type...
var includeIn:String = xml.attribute("includeIn");
- if ( includeIn != "" && includeIn != Serializer.instance.includeInType )
+ //if ( includeIn != "" && includeIn != Serializer.instance.includeInType )
+ if ( Serializer.instance.includeInType != null && Serializer.instance.includeInType != "" && includeIn != "" && includeIn.indexOf(Serializer.instance.includeInType) < 0 )
{
Profiler.exit("instantiateEntityFromXML");
return null; //only create instances for entities that includeIn match the includeInType, if defined
View
4 src/com/starling/input/ThumbAnalogInputComponent.as
@@ -2,12 +2,12 @@ package com.starling.input
{
import com.pblabs.engine.entity.EntityComponent;
import com.pblabs.engine.PBE;
- import com.starling.rendering2D.IStarlingApplication;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Point;
import flash.geom.Rectangle;
+ import starling.core.Starling;
import starling.display.Image;
import starling.display.Quad;
import starling.display.Stage;
@@ -69,7 +69,7 @@ package com.starling.input
//add the thumb control to the starling stage (Not the PBE StarlingScene)
- var stage:Stage = (PBE.mainClass as IStarlingApplication).starling.stage;
+ var stage:Stage = Starling.current.stage;
var paddingX:int = 30;
var paddingY:int = 20;

0 comments on commit f5e2011

Please sign in to comment.