public async Task Run() { // Log to the logging system whenever we obtain a bounty _api.Events.BountyEvent += (sender, e) => { string target = e.Target; long amount = e.TotalReward; _log.LogInformation("New bounty obtained: CR{amount} for killing {target}", amount, target); }; // Start EliteAPI await _api.StartAsync(); }
public async Task Run() { // Log to the logging system whenever we change our gear _api.Status.Gear.OnChange += (sender, isDeployed) => { string message = ""; if (isDeployed) { message = "Landing gears deployed"; } else { message = "Landing gears retracted"; } _log.LogInformation(message); }; // Start EliteAPI await _api.StartAsync(); }
public async Task Run() { // Start EliteAPI await _api.StartAsync(); }