public async Task GoToRoomNoAsync(int destinationRoomNo) { if (currentLocation != destinationRoomNo) { if (currentLocation == 9 || destinationRoomNo == 9) { Mvx.IoCProvider.Resolve <ISoundPlayerService>().PlayThunder(); } else { Mvx.IoCProvider.Resolve <ISoundPlayerService>().PlayFootsteps(); } await Task.Delay(500); } await Mvx.IoCProvider.Resolve <IMvxNavigationService>().Navigate(GetViewModelForRoomNo(destinationRoomNo)); currentLocation = destinationRoomNo; CurrentLocationChanged?.Invoke(this, new EventArgs()); }
internal static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation) { CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation)); }
public static void InvokeCurrentLocationChanged(GameLocation newLocation) { CurrentLocationChanged.Invoke(newLocation); }