private async void OnLogin() { #pragma warning disable 4014 await BlipHandler.AddBlipAsync("Train station", Locations.TransitLocations.TrainStations.Values.ToList(), new BlipOptions { Sprite = BlipSprite.Lift }); MarkerHandler.AddMarkerAsync(Locations.TransitLocations.TrainStations.Values.ToList(), new MarkerOptions { ScaleFloat = 2.0f, zOffset = -0.94f }); await BlipHandler.AddBlipAsync("Bus stop", Locations.TransitLocations.BusStops.Values.ToList(), new BlipOptions { Sprite = BlipSprite.VinewoodTours }); MarkerHandler.AddMarkerAsync(Locations.TransitLocations.BusStops.Values.ToList(), new MarkerOptions { ScaleFloat = 2.0f, zOffset = -0.94f }); #pragma warning restore 4014 buildUIElements(); }
public WarpPoint(Vector3 enterLocation, Vector3 exitLoccation, Color markerColour = default(Color), float markerScale = 1.0f) { #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed MarkerHandler.AddMarkerAsync(new List <Vector3> { enterLocation, exitLoccation }, new MarkerOptions { Color = markerColour == default(Color) ? ConstantColours.Yellow : markerColour, ScaleFloat = markerScale }); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed EnterLocation = enterLocation; ExitLocation = exitLoccation; Client.Instance.RegisterEventHandler("Player.CheckForInteraction", new Action(OnInteraction)); }