/// <summary> /// Handles a goal scored request from a client /// </summary> static public void Handle_CS_GoalScored(CS_GoalScored pkt, Player player) { //Allow the player's arena to handle it if (player._arena == null) { Log.write(TLog.Error, "Handle_CS_GoalScored(): Player {0} sent update packet with no arena.", player); return; } if (player.IsSpectator) { Log.write(TLog.Warning, "Handle_CS_GoalScored(): Player {0} attempted to score a goal from spec.", player); return; } // Arena handles it, so they can keep track of the score player._arena.handleEvent(delegate(Arena arena) { if (arena == null) { Log.write(TLog.Error, "Handle_CS_GoalScored(): Player {0} sent chat packet with no delegating arena.", player); return; } player._arena.handlePlayerGoal(player, pkt); }); }
/// <summary> /// Triggered when a player has scored a goal /// </summary> public virtual void handlePlayerGoal(Player from, CS_GoalScored pkt) { }
public bool handlePlayerGoal(Player player, Ball ball, CS_GoalScored pkt) { return(true); }