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());
        }
Пример #2
0
 internal static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
 {
     CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation));
 }
Пример #3
0
 public static void InvokeCurrentLocationChanged(GameLocation newLocation)
 {
     CurrentLocationChanged.Invoke(newLocation);
 }