kxg.quickstart.ServerConnectionStage¶
-
class
kxg.quickstart.
ServerConnectionStage
(world, referee, num_clients, ai_actors=None, host='localhost', port=53351)[source]¶ Bases:
kxg.quickstart.Stage
Event Handlers:
Give the stage a chance to set itself up before it is updated for the first time.
on_update_stage
(dt)Give the stage a chance to react to each clock cycle.
on_clients_connected
(pipes)Give the stage a chance to react before it is stopped and the next stage is started.
Inherited from
Stage
Give the stage a chance to set itself up before it is updated for the first time.
on_update_stage
(dt)Give the stage a chance to react to each clock cycle.
Give the stage a chance to react before it is stopped and the next stage is started.
Public Methods:
__init__
(world, referee, num_clients[, …])Initialize self.
-
__init__
(world, referee, num_clients, ai_actors=None, host='localhost', port=53351)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
exit_stage
()¶ Stop this stage from executing once the current update ends.
-
exit_theater
()¶ Exit the game once the current update ends.
-
property
gui
¶
-
on_enter_stage
()[source]¶ Give the stage a chance to set itself up before it is updated for the first time.
-
on_exit_stage
()[source]¶ Give the stage a chance to react before it is stopped and the next stage is started.
You can define the next stage by setting the Stage.successor attribute. If the successor is static, you can just set it in the constructor. But if it will differ depending on the context, this method may be a good place to calculate it because it is called only once and just before the theater queries for the successor.
-