private void Init(Connection connection) { localPlayerData = connection.PlayerData; ConstructPlayersText(); usernameInput.text = localPlayerData.Username; if (room is SteamRoom) { usernameInput.text = SteamClient.Name; localPlayerData.CmdSetUsername(SteamClient.Name); commandLogger.LogCommand($"Player wants to set username to {SteamClient.Name}."); } }
/// <summary> /// Log sql statement<br/> /// 记录sql语句<br/> /// </summary> public override SqlString OnPrepareStatement(SqlString sql) { if (CommandLogger != null && Context != null) { CommandLogger.LogCommand(Context, sql.ToString(), null); } return base.OnPrepareStatement(sql); }
private void MoveTowards(Vector2 destinationPoint) { playerMovement.CmdMoveTowards(destinationPoint); commandLogger.LogCommand($"Player wants to move to destination point {destinationPoint}."); }