diff --git a/src/as/com/threerings/ezgame/AbstractControl.as b/src/as/com/threerings/ezgame/AbstractControl.as index a9433a43..63a5fe63 100644 --- a/src/as/com/threerings/ezgame/AbstractControl.as +++ b/src/as/com/threerings/ezgame/AbstractControl.as @@ -72,6 +72,7 @@ public class AbstractControl extends EventDispatcher /** * Populate any properties or functions we want to expose to the host code. + * @private */ protected function populateProperties (o :Object) :void { @@ -80,6 +81,7 @@ public class AbstractControl extends EventDispatcher /** * Grab any properties needed from our host code. + * @private */ protected function setHostProps (o :Object) :void { @@ -88,6 +90,7 @@ public class AbstractControl extends EventDispatcher /** * Your own events may not be dispatched here. + * @private */ override public function dispatchEvent (event :Event) :Boolean { @@ -99,6 +102,7 @@ public class AbstractControl extends EventDispatcher /** * Secret function to dispatch property changed events. + * @private */ protected function dispatch (event :Event) :void { @@ -112,6 +116,7 @@ public class AbstractControl extends EventDispatcher /** * Call a method exposed by the host code. + * @private */ protected function callHostCode (name :String, ... args) :* { @@ -120,6 +125,7 @@ public class AbstractControl extends EventDispatcher /** * Exposed to sub controls. + * @private */ internal function callHostCodeFriend (name :String, args :Array) :* { @@ -129,6 +135,7 @@ public class AbstractControl extends EventDispatcher /** * Helper method to throw an error if we're not connected. + * @private */ protected function checkIsConnected () :void { diff --git a/src/as/com/threerings/ezgame/AbstractGameControl.as b/src/as/com/threerings/ezgame/AbstractGameControl.as index 85ec3bbf..ce536faf 100644 --- a/src/as/com/threerings/ezgame/AbstractGameControl.as +++ b/src/as/com/threerings/ezgame/AbstractGameControl.as @@ -73,6 +73,9 @@ public class AbstractGameControl extends AbstractControl disp.root.loaderInfo.addEventListener(Event.UNLOAD, dispatch); } + /** + * @inheritDoc + */ override public function isConnected () :Boolean { return _connected; @@ -80,6 +83,7 @@ public class AbstractGameControl extends AbstractControl /** * Create any subcontrols used by this game. + * @private */ protected function createSubControls () :void { @@ -94,6 +98,7 @@ public class AbstractGameControl extends AbstractControl /** * Create the 'local' subcontrol. + * @private */ protected function createLocalControl () :EZLocalSubControl { @@ -102,6 +107,7 @@ public class AbstractGameControl extends AbstractControl /** * Create the 'net' subcontrol. + * @private */ protected function createNetControl () :EZNetSubControl { @@ -110,6 +116,7 @@ public class AbstractGameControl extends AbstractControl /** * Create the 'player' subcontrol. + * @private */ protected function createPlayerControl () :EZPlayerSubControl { @@ -118,6 +125,7 @@ public class AbstractGameControl extends AbstractControl /** * Create the 'game' subcontrol. + * @private */ protected function createGameControl () :EZGameSubControl { @@ -126,6 +134,7 @@ public class AbstractGameControl extends AbstractControl /** * Create the 'services' subcontrol. + * @private */ protected function createServicesControl () :EZServicesSubControl { @@ -135,6 +144,7 @@ public class AbstractGameControl extends AbstractControl /** * Populate any properties or functions we want to expose to the other side of the ezgame * security boundary. + * @private */ override protected function populateProperties (o :Object) :void { @@ -150,6 +160,7 @@ public class AbstractGameControl extends AbstractControl /** * Sets the properties we received from the host framework on the other side of the security * boundary. + * @private */ override protected function setHostProps (o :Object) :void { @@ -166,6 +177,9 @@ public class AbstractGameControl extends AbstractControl _funcs = o; } + /** + * @private + */ override protected function callHostCode (name :String, ... args) :* { if (_funcs != null) { @@ -188,6 +202,7 @@ public class AbstractGameControl extends AbstractControl /** * Internal method that is called whenever the mouse clicks our root. + * @private */ protected function handleRootClick (evt :MouseEvent) :void { @@ -211,20 +226,28 @@ public class AbstractGameControl extends AbstractControl _connected = false; } - /** Are we connected? */ + /** Are we connected? @private */ protected var _connected :Boolean; - /** Contains functions exposed to us from the EZGame host. */ + /** Contains functions exposed to us from the EZGame host. @private */ protected var _funcs :Object; - /** Holds all our sub-controls. */ + /** Holds all our sub-controls. @private */ protected var _subControls :Array = []; - /** Specific sub-controls. */ + /** The local sub-control. @private */ protected var _localCtrl :EZLocalSubControl; + + /** The net sub-control. @private */ protected var _netCtrl :EZNetSubControl; + + /** The player sub-control. @private */ protected var _playerCtrl :EZPlayerSubControl; + + /** The game sub-control. @private */ protected var _gameCtrl :EZGameSubControl; + + /** The services sub-control. @private */ protected var _servicesCtrl :EZServicesSubControl; } } diff --git a/src/as/com/threerings/ezgame/AbstractSubControl.as b/src/as/com/threerings/ezgame/AbstractSubControl.as index a148e718..eac684ff 100644 --- a/src/as/com/threerings/ezgame/AbstractSubControl.as +++ b/src/as/com/threerings/ezgame/AbstractSubControl.as @@ -38,31 +38,47 @@ public class AbstractSubControl extends AbstractControl _parent = parent; } + /** + * @inheritDoc + */ override public function isConnected () :Boolean { return _parent.isConnected(); } + /** + * @inheritDoc + */ override public function doBatch (fn :Function) :void { return _parent.doBatch(fn); } + /** + * @private + */ override protected function callHostCode (name :String, ... args) :* { return _parent.callHostCodeFriend(name, args); } + /** + * @private + */ internal function populatePropertiesFriend (o :Object) :void { populateProperties(o); } + /** + * @private + */ internal function setHostPropsFriend (o :Object) :void { setHostProps(o); } + /** @private */ protected var _parent :AbstractControl; } } diff --git a/src/as/com/threerings/ezgame/EZBagsSubControl.as b/src/as/com/threerings/ezgame/EZBagsSubControl.as index a81e04d3..c0e52333 100644 --- a/src/as/com/threerings/ezgame/EZBagsSubControl.as +++ b/src/as/com/threerings/ezgame/EZBagsSubControl.as @@ -117,6 +117,7 @@ public class EZBagsSubControl extends AbstractSubControl /** * Helper method for create and addTo. + * @private */ protected function populate ( bagName :String, values :Array, clearExisting :Boolean) :void @@ -126,6 +127,7 @@ public class EZBagsSubControl extends AbstractSubControl /** * Helper method for pick and deal. + * @private */ protected function getFrom ( bagName :String, count :int, msgOrPropName :String, playerId :int, diff --git a/src/as/com/threerings/ezgame/EZEvent.as b/src/as/com/threerings/ezgame/EZEvent.as index 36a0d18d..f0cc2c82 100644 --- a/src/as/com/threerings/ezgame/EZEvent.as +++ b/src/as/com/threerings/ezgame/EZEvent.as @@ -23,6 +23,8 @@ package com.threerings.ezgame { import flash.events.Event; +/** + */ public /*abstract*/ class EZEvent extends Event { /** @@ -40,7 +42,7 @@ public /*abstract*/ class EZEvent extends Event _gameCtrl = gameCtrl as AbstractGameControl; } - /** The game control for this event. */ + /** The game control for this event. @private */ protected var _gameCtrl :AbstractGameControl; } } diff --git a/src/as/com/threerings/ezgame/EZGameSubControl.as b/src/as/com/threerings/ezgame/EZGameSubControl.as index d35156b7..1dd6f34a 100644 --- a/src/as/com/threerings/ezgame/EZGameSubControl.as +++ b/src/as/com/threerings/ezgame/EZGameSubControl.as @@ -254,12 +254,16 @@ public class EZGameSubControl extends AbstractSubControl /** * Create the 'seating' subcontrol. + * @private */ protected function createSeatingControl () :EZSeatingSubControl { return new EZSeatingSubControl(_parent, this); } + /** + * @private + */ override protected function populateProperties (o :Object) :void { super.populateProperties(o); @@ -274,6 +278,9 @@ public class EZGameSubControl extends AbstractSubControl _seatingCtrl.populatePropertiesFriend(o); } + /** + * @private + */ override protected function setHostProps (o :Object) :void { super.setHostProps(o); @@ -335,10 +342,10 @@ public class EZGameSubControl extends AbstractSubControl dispatch(new UserChatEvent(_parent, speaker, message)); } - /** Contains any custom game configuration data. */ + /** Contains any custom game configuration data. @private */ protected var _gameConfig :Object = {}; - /** The seating sub-control. */ + /** The seating sub-control. @private */ protected var _seatingCtrl :EZSeatingSubControl; } } diff --git a/src/as/com/threerings/ezgame/EZLocalSubControl.as b/src/as/com/threerings/ezgame/EZLocalSubControl.as index da63ec5f..9f7b2f49 100644 --- a/src/as/com/threerings/ezgame/EZLocalSubControl.as +++ b/src/as/com/threerings/ezgame/EZLocalSubControl.as @@ -57,7 +57,9 @@ public class EZLocalSubControl extends AbstractSubControl super(parent); } - // documentation inherited + /** + * @inheritDoc + */ override public function addEventListener ( type :String, listener :Function, useCapture :Boolean = false, priority :int = 0, useWeakReference :Boolean = false) :void @@ -74,7 +76,9 @@ public class EZLocalSubControl extends AbstractSubControl } } - // documentation inherited + /** + * @inheritDoc + */ override public function removeEventListener ( type :String, listener :Function, useCapture :Boolean = false) :void { @@ -119,6 +123,9 @@ public class EZLocalSubControl extends AbstractSubControl return (callHostCode("filter_v1", text) as String); } + /** + * @private + */ override protected function populateProperties (o :Object) :void { super.populateProperties(o); diff --git a/src/as/com/threerings/ezgame/EZNetSubControl.as b/src/as/com/threerings/ezgame/EZNetSubControl.as index 71d6c684..1011e81d 100644 --- a/src/as/com/threerings/ezgame/EZNetSubControl.as +++ b/src/as/com/threerings/ezgame/EZNetSubControl.as @@ -137,6 +137,9 @@ public class EZNetSubControl extends AbstractSubControl callHostCode("sendMessage_v2", messageName, value, playerId); } + /** + * @private + */ override protected function populateProperties (o :Object) :void { super.populateProperties(o); @@ -145,6 +148,9 @@ public class EZNetSubControl extends AbstractSubControl o["messageReceived_v1"] = messageReceived_v1; } + /** + * @private + */ override protected function setHostProps (o :Object) :void { super.setHostProps(o); @@ -169,7 +175,7 @@ public class EZNetSubControl extends AbstractSubControl dispatch(new MessageReceivedEvent(_parent, name, value)); } - /** Game properties. */ + /** Game properties. @private */ protected var _gameData :Object; } } diff --git a/src/as/com/threerings/ezgame/EZSeatingSubControl.as b/src/as/com/threerings/ezgame/EZSeatingSubControl.as index 62808537..0d618d12 100644 --- a/src/as/com/threerings/ezgame/EZSeatingSubControl.as +++ b/src/as/com/threerings/ezgame/EZSeatingSubControl.as @@ -74,7 +74,7 @@ public class EZSeatingSubControl extends AbstractSubControl ); } - /** Our direct parent. */ + /** Our direct parent. @private */ protected var _game :EZGameSubControl; } } diff --git a/src/as/com/threerings/ezgame/EZServicesSubControl.as b/src/as/com/threerings/ezgame/EZServicesSubControl.as index b4a84cc2..0500c6bc 100644 --- a/src/as/com/threerings/ezgame/EZServicesSubControl.as +++ b/src/as/com/threerings/ezgame/EZServicesSubControl.as @@ -100,12 +100,16 @@ public class EZServicesSubControl extends AbstractSubControl /** * Create the 'bags' subcontrol. + * @private */ protected function createBagsControl () :EZBagsSubControl { return new EZBagsSubControl(_parent); } + /** + * @private + */ override protected function populateProperties (o :Object) :void { super.populateProperties(o); @@ -113,6 +117,9 @@ public class EZServicesSubControl extends AbstractSubControl _bagsCtrl.populatePropertiesFriend(o); } + /** + * @private + */ override protected function setHostProps (o :Object) :void { super.setHostProps(o); @@ -120,7 +127,7 @@ public class EZServicesSubControl extends AbstractSubControl _bagsCtrl.setHostPropsFriend(o); } - /** The bags sub-control. */ + /** The bags sub-control. @private */ protected var _bagsCtrl :EZBagsSubControl; } } diff --git a/src/as/com/threerings/ezgame/OccupantChangedEvent.as b/src/as/com/threerings/ezgame/OccupantChangedEvent.as index 7025ff4b..77b7efdf 100644 --- a/src/as/com/threerings/ezgame/OccupantChangedEvent.as +++ b/src/as/com/threerings/ezgame/OccupantChangedEvent.as @@ -60,7 +60,10 @@ public class OccupantChangedEvent extends EZEvent return new OccupantChangedEvent(type, _gameCtrl, _occupantId, _player); } + /** @private */ protected var _occupantId :int; + + /** @private */ protected var _player :Boolean; } } diff --git a/src/as/com/threerings/ezgame/PropertyChangedEvent.as b/src/as/com/threerings/ezgame/PropertyChangedEvent.as index a64db916..6ea444a6 100644 --- a/src/as/com/threerings/ezgame/PropertyChangedEvent.as +++ b/src/as/com/threerings/ezgame/PropertyChangedEvent.as @@ -89,10 +89,16 @@ public class PropertyChangedEvent extends EZEvent return new PropertyChangedEvent(_gameCtrl, _name, _newValue, _oldValue, _index); } - /** Our implementation details. */ + /** @private */ protected var _name :String; + + /** @private */ protected var _newValue :Object; + + /** @private */ protected var _oldValue :Object; + + /** @private */ protected var _index :int; } } diff --git a/src/as/com/threerings/ezgame/SizeChangedEvent.as b/src/as/com/threerings/ezgame/SizeChangedEvent.as index 59382d03..4b820025 100644 --- a/src/as/com/threerings/ezgame/SizeChangedEvent.as +++ b/src/as/com/threerings/ezgame/SizeChangedEvent.as @@ -62,7 +62,7 @@ public class SizeChangedEvent extends EZEvent return new SizeChangedEvent(_gameCtrl, _size.clone()); } - /** Our implementation details. */ + /** Our implementation details. @private */ protected var _size: Point; } } diff --git a/src/as/com/threerings/ezgame/UserChatEvent.as b/src/as/com/threerings/ezgame/UserChatEvent.as index 24ebcb50..8b561abc 100644 --- a/src/as/com/threerings/ezgame/UserChatEvent.as +++ b/src/as/com/threerings/ezgame/UserChatEvent.as @@ -67,8 +67,10 @@ public class UserChatEvent extends EZEvent return new UserChatEvent(_gameCtrl, _speaker, _message); } - /** Our implementation details. */ + /** @private */ protected var _speaker: int; + + /** @private */ protected var _message :String; } }