/// <summary> /// Proccess a player's change direction. /// </summary> /// <param name="player">The player doing the action.</param> /// <param name="world">A reference to the gameworld.</param> private void ProcessChangeDirection(Player player, GameWorld world) { byte rawDirection = netmsg.GetByte(); //Validate direction if (!IsDirectionValid(rawDirection)) { return; } Direction direction; //direction to move direction = (Direction)rawDirection; #if DEBUG Log.WriteDebug("In ProcessChangeDirection()"); Log.WriteDebug("direction: " + direction); #endif world.HandleChangeDirection(player, direction); }
/// <summary> /// Proccess a player's change direction. /// </summary> /// <param name="player">The player doing the action.</param> /// <param name="world">A reference to the gameworld.</param> private void ProcessChangeDirection(Player player, GameWorld world) { byte rawDirection = netmsg.GetByte(); //Validate direction if (!IsDirectionValid(rawDirection)) return; Direction direction; //direction to move direction = (Direction)rawDirection; #if DEBUG Log.WriteDebug("In ProcessChangeDirection()"); Log.WriteDebug("direction: " + direction); #endif world.HandleChangeDirection(player, direction); }