Added isConnected().
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@144 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -26,16 +26,23 @@ public class EZGameControl extends EventDispatcher
|
|||||||
event.userProps = new Object();
|
event.userProps = new Object();
|
||||||
populateProperties(event.userProps);
|
populateProperties(event.userProps);
|
||||||
disp.root.loaderInfo.sharedEvents.dispatchEvent(event);
|
disp.root.loaderInfo.sharedEvents.dispatchEvent(event);
|
||||||
if (event.ezProps != null) {
|
if ("ezProps" in event) {
|
||||||
setEZProps(event.ezProps);
|
setEZProps(event.ezProps);
|
||||||
} else {
|
|
||||||
trace("The game is not being run in the ezgame environment");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up our focusing click handler
|
// set up our focusing click handler
|
||||||
disp.root.addEventListener(MouseEvent.CLICK, handleRootClick);
|
disp.root.addEventListener(MouseEvent.CLICK, handleRootClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Are we connected and running inside the EZGame environment, or
|
||||||
|
* has someone just loaded up this swf by itself?
|
||||||
|
*/
|
||||||
|
public function isConnected () :Boolean
|
||||||
|
{
|
||||||
|
return (_gameData != null);
|
||||||
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
override public function addEventListener (
|
override public function addEventListener (
|
||||||
type :String, listener :Function, useCapture :Boolean = false,
|
type :String, listener :Function, useCapture :Boolean = false,
|
||||||
|
|||||||
Reference in New Issue
Block a user