Inheritance: HaxxitGameState
コード例 #1
0
 private void TurnDoneListener(SimplePubSub.INotifiable notifiable, string channel, object sender, EventArgs args)
 {
     _mediator_manager.Notify("haxxit.undo_stack.clear", this, new EventArgs());
     TempDialogGameState new_state;
     // This does not work since SimplePubSub does not guarentee any ordering of subscribers.
     //if (display_map_state.Map.CurrentPlayer.GetType() == typeof(PlayerAI))
     if (!is_ai_turn)
     {
         new_state = new TempDialogGameState(this, "S.A.N.T.A.'s turn", 1000);
         is_ai_turn = true;
     }
     else
     {
         new_state = new TempDialogGameState(this, "Your turn", 1000);
         is_ai_turn = false;
     }
     foreach (DrawableRectangle rectangle in head_nodes.Values)
     {
         rectangle.FillColor = Color.Transparent;
     }
     _mediator_manager.Notify("haxxit.engine.state.push", this, new ChangeStateEventArgs(new_state));
 }
コード例 #2
0
 private void SilicoinNodeListener(SimplePubSub.INotifiable notifiable, string channel, object sender, EventArgs args)
 {
     SilicoinEventArgs event_args = (SilicoinEventArgs)args;
     TempDialogGameState new_state = new TempDialogGameState(this, "Added " + event_args.Silicoins.ToString() + " silicoins.", 500);
     // This breaks everything for some reason.
     //_mediator_manager.Notify("haxxit.engine.state.push", this, new ChangeStateEventArgs(new_state));
 }