internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { IBasicEvents listener = robot.GetBasicEventListener(); if (listener != null) { listener.OnRobotDeath(this); } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { IBasicEvents listener = robot.GetBasicEventListener(); if (listener != null) { listener.OnStatus(this); } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (robot != null) { var listener = robot.GetBasicEventListener() as IBasicEvents2; if (listener != null) { listener.OnBattleEnded(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsPaintRobot()) { IPaintEvents listener = ((IPaintRobot) robot).GetPaintEventListener(); if (listener != null) { listener.OnPaint(graphics); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsAdvancedRobot()) { IAdvancedEvents listener = ((IAdvancedRobot) robot).GetAdvancedEventListener(); if (listener != null) { listener.OnSkippedTurn(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsTeamRobot()) { ITeamEvents listener = ((ITeamRobot)robot).GetTeamEventListener(); if (listener != null) { listener.OnMessageReceived(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsTeamRobot()) { ITeamEvents listener = ((ITeamRobot) robot).GetTeamEventListener(); if (listener != null) { listener.OnMessageReceived(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsInteractiveRobot()) { IInteractiveEvents listener = ((IInteractiveRobot) robot).GetInteractiveEventListener(); if (listener != null) { listener.OnMouseWheelMoved(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsAdvancedRobot()) { IAdvancedEvents listener = ((IAdvancedRobot)robot).GetAdvancedEventListener(); if (listener != null) { listener.OnSkippedTurn(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsInteractiveRobot()) { IInteractiveEvents listener = ((IInteractiveRobot)robot).GetInteractiveEventListener(); if (listener != null) { listener.OnKeyTyped(this); } } }
internal override void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (statics.IsPaintRobot()) { IPaintEvents listener = ((IPaintRobot)robot).GetPaintEventListener(); if (listener != null) { listener.OnPaint(graphics); } } }
internal override sealed void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { if (robot != null) { IBasicEvents3 listener = robot.GetBasicEventListener() as IBasicEvents3; if (listener != null) { listener.OnRoundEnded(this); } } }
/// <summary> /// Dispatch this event for a robot, it's statistics, and graphics context. /// </summary> /// <param name="robot">the robot to dispatch to.</param> /// <param name="statics">the robot to statistics to.</param> /// <param name="graphics">the robot to graphics to.</param> // This method must be invisible on Robot API internal virtual void Dispatch(IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { }
public static void Dispatch(Event evnt, IBasicRobot robot, IRobotStaticsN statics, IGraphics graphics) { eventHelper.Dispatch(evnt, robot, statics, graphics); }