Ejemplo n.º 1
0
        internal void Navigate(NavigationPaths direction)
        {
            Levels currentlevel = _room.Level;

            if (_room.RoomType == RoomTypes.Trophy)
            {
                _room = RoomFactory.GetRoom(currentlevel + 1, 0); //new level, 1st room
            }
            else //just a normal room
            {
                switch (direction)
                {
                case NavigationPaths.Up:
                    _room = RoomFactory.GetRoom(currentlevel, _room.RoomUpIndex);
                    break;

                case NavigationPaths.Straight:
                    _room = RoomFactory.GetRoom(currentlevel, _room.RoomStraightIndex);
                    break;

                case NavigationPaths.Down:
                    _room = RoomFactory.GetRoom(currentlevel, _room.RoomDownIndex);
                    break;
                }
            }
            IsDirty = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// This is the navigation screen that shows the player which direction he can go.
 /// There is no closing animation. (YET)
 /// Setting a parameter to false will disable that direction.
 /// function ShowNavigation(
 ///left:String,     //boolean value.  Accepts [true, TRUE, 1] and [false, FALSE, 0]
 ///middle:String,	//boolean value.  Accepts [true, TRUE, 1] and [false, FALSE, 0]
 ///right:String     //boolean value.  Accepts [true, TRUE, 1] and [false, FALSE, 0]
 ///):void
 /// </summary>
 /// <param name="status"></param>
 public void ShowNavigation(NavigationPaths pathsAvailable)
 {
     if (flashBackground.Movie != _playerstatusSwfFile)
     {
         _log.Error("Cannot ShowNavigation because current movie on background is " + flashBackground.Movie);
         return;
     }
     try
     {
         lock (_lock)
         {
             if (flashBackground.Movie != _playerstatusSwfFile)
             {
                 _log.Error("Cannot ShowNavigation because current movie on background is " + flashBackground.Movie);
                 return;
             }
             int up       = pathsAvailable.HasFlag(NavigationPaths.Up) ? 1 : 0;
             int straight = pathsAvailable.HasFlag(NavigationPaths.Straight) ? 1 : 0;
             int down     = pathsAvailable.HasFlag(NavigationPaths.Down) ? 1 : 0;
             callFlashString(flashBackground, "ShowNavigation", up, straight, down);
         }
     }
     catch (Exception ex)
     {
         _log.Error("Error ShowNavigation in background.", ex);
     }
 }
Ejemplo n.º 3
0
 internal static void ShowNavigation(NavigationPaths pathsAvailable)
 {
     if (_instance._currentMode != DisplayConstants.Modes.ActiveGameMode.ACTIVEGAMEMODE)
     {
         return;
     }
     getInstance()._display.ShowNavigation(pathsAvailable);
 }
Ejemplo n.º 4
0
            private void navigate(NavigationPaths direction)
            {
                //if we're here, it's because we can be (not blocked)

                PlayerStatus.CurrentPlayer.Navigate(direction);
                if (PlayerStatus.CurrentPlayer.RoomType != RoomTypes.Trophy)
                {
                    enterRoom();
                }
                else
                {
                    enterTrophyRoom();
                }
            }
Ejemplo n.º 5
0
 internal static void ShowNavigation(NavigationPaths pathsAvailable)
 {
     if (_instance._currentMode != DisplayConstants.Modes.ActiveGameMode.ACTIVEGAMEMODE)
         return;
     getInstance()._display.ShowNavigation(pathsAvailable);
 }
 private void InitCommands()
 {
     NavigateToAuthPageCommand           = ReactiveCommand.CreateFromTask(() => _navigationService.GoToAsync(NavigationPaths.ToAuthPage()));
     NavigateToCloudMessagingPageCommand = ReactiveCommand.CreateFromTask(() => _navigationService.GoToAsync(NavigationPaths.ToCloudMessagingPage()));
     NavigateToRemoteConfigPageCommand   = ReactiveCommand.CreateFromTask(() => _navigationService.GoToAsync(NavigationPaths.ToRemoteConfigPage()));
     NavigateToStoragePageCommand        = ReactiveCommand.CreateFromTask(() => _navigationService.GoToAsync(NavigationPaths.ToStoragePage()));
 }
Ejemplo n.º 7
0
            private void navigate(NavigationPaths direction)
            {
                //if we're here, it's because we can be (not blocked)

                PlayerStatus.CurrentPlayer.Navigate(direction);
                if (PlayerStatus.CurrentPlayer.RoomType != RoomTypes.Trophy)
                    enterRoom();
                else
                    enterTrophyRoom();
            }
Ejemplo n.º 8
0
 /// <summary>
 /// This is the navigation screen that shows the player which direction he can go.  
 /// There is no closing animation. (YET)
 /// Setting a parameter to false will disable that direction.
 /// function ShowNavigation(
 ///left:String, 	//boolean value.  Accepts [true, TRUE, 1] and [false, FALSE, 0]
 ///middle:String,	//boolean value.  Accepts [true, TRUE, 1] and [false, FALSE, 0]
 ///right:String 	//boolean value.  Accepts [true, TRUE, 1] and [false, FALSE, 0]
 ///):void
 /// </summary>
 /// <param name="status"></param>
 public void ShowNavigation(NavigationPaths pathsAvailable)
 {
     if (flashBackground.Movie != _playerstatusSwfFile)
     {
         _log.Error("Cannot ShowNavigation because current movie on background is " + flashBackground.Movie);
         return;
     }
     try
     {
         lock (_lock)
         {
             if (flashBackground.Movie != _playerstatusSwfFile)
             {
                 _log.Error("Cannot ShowNavigation because current movie on background is " + flashBackground.Movie);
                 return;
             }
             int up = pathsAvailable.HasFlag(NavigationPaths.Up) ? 1 : 0;
             int straight = pathsAvailable.HasFlag(NavigationPaths.Straight) ? 1 : 0;
             int down = pathsAvailable.HasFlag(NavigationPaths.Down) ? 1 : 0;
             callFlashString(flashBackground, "ShowNavigation", up, straight, down);
         }
     }
     catch (Exception ex)
     {
         _log.Error("Error ShowNavigation in background.", ex);
     }
 }
Ejemplo n.º 9
0
 internal void Navigate(NavigationPaths direction)
 {
     Levels currentlevel = _room.Level;
     if (_room.RoomType == RoomTypes.Trophy)
     {
         _room = RoomFactory.GetRoom(currentlevel + 1, 0); //new level, 1st room
     }
     else //just a normal room
     {
         switch (direction)
         {
             case NavigationPaths.Up:
                 _room = RoomFactory.GetRoom(currentlevel, _room.RoomUpIndex);
                 break;
             case NavigationPaths.Straight:
                 _room = RoomFactory.GetRoom(currentlevel, _room.RoomStraightIndex);
                 break;
             case NavigationPaths.Down:
                 _room = RoomFactory.GetRoom(currentlevel, _room.RoomDownIndex);
                 break;
         }
     }
     IsDirty = true;
 }