SeatingSubControl: Difference between revisions

From Whirled Club Wiki
Jump to navigation Jump to search
(Created page with "The '''[http://www.whirled.com/code/asdocs/com/whirled/game/SeatingSubControl.html SeatingSubControl]''' is a subcontrol used by seated multiplayer games to retrieve the...")
 
m (Text replacement - ">" to ">")
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
You should always access SeatingSubControl via the GameControl, don't try to instantiate the object directly.   
You should always access SeatingSubControl via the GameControl, don't try to instantiate the object directly.   


<actionscript>
<actionscript>
public class MyGame extends Sprite {
public class MyGame extends Sprite {
     public MyGame () {
     public MyGame () {
Line 28: Line 28:
   
   
}
}
&lt;/actionscript&gt;
</actionscript>


== Other Links ==
== Other Links ==

Latest revision as of 11:27, 4 September 2018

The SeatingSubControl is a subcontrol used by seated multiplayer games to retrieve the status of the players in the seated game.

Initialization

You should always access SeatingSubControl via the GameControl, don't try to instantiate the object directly.

<actionscript> public class MyGame extends Sprite {

   public MyGame () {
       _ctrl = new GameControl(this);
       //you can either access the SeatingSubControl via a handle
       //like this
       _seating = _ctrl.game.seating; 
       _myPos = _seating.getMyPosition(); 


       //or like this directly via the control object.
       _myPos = _ctrl.game.seating.getMyPosition();
       
   }
   protected _ctrl :GameControl;
   protected _seating : SeatingSubControl;
   protected _myPos: int; 

} </actionscript>

Other Links


Stub.gifThis article is a stub. You can help the wiki by expanding it.