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());
        }
Ejemplo n.º 2
0
 internal static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
 {
     CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation));
 }
Ejemplo n.º 3
0
 public static void InvokeCurrentLocationChanged(GameLocation newLocation)
 {
     CurrentLocationChanged.Invoke(newLocation);
 }