Broke out sending the player-ready signal to the server into a method
so that it can easily be overridden. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3709 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -108,8 +108,7 @@ public abstract class GameController extends PlaceController
|
|||||||
public void run () {
|
public void run () {
|
||||||
// finally let the game manager know that we're ready
|
// finally let the game manager know that we're ready
|
||||||
// to roll
|
// to roll
|
||||||
Log.info("Reporting ready " + _gobj.which() + ".");
|
playerReady();
|
||||||
_gobj.gameService.playerReady(_ctx.getClient());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -230,6 +229,16 @@ public abstract class GameController extends PlaceController
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after we've entered the game and everything has initialized
|
||||||
|
* to notify the server that we, as a player, are ready to play.
|
||||||
|
*/
|
||||||
|
protected void playerReady ()
|
||||||
|
{
|
||||||
|
Log.info("Reporting ready " + _gobj.which() + ".");
|
||||||
|
_gobj.gameService.playerReady(_ctx.getClient());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the game transitions to the <code>IN_PLAY</code>
|
* Called when the game transitions to the <code>IN_PLAY</code>
|
||||||
* state. This happens when all of the players have arrived and the
|
* state. This happens when all of the players have arrived and the
|
||||||
|
|||||||
Reference in New Issue
Block a user