Ejemplo n.º 1
0
        public static void PlayDialog(string dialogName)
        {
            switch (dialogName)
            {
            case "Tutorial1":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog1(), "Tutorial1");
                break;

            case "Tutorial2":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog2(), "Tutorial2");
                break;

            case "Tutorial3":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog3(), "Tutorial3");
                break;

            case "Tutorial4":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog4(), "Tutorial4");
                break;

            case "Tutorial5":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog5(), "Tutorial5");
                break;

            case "Tutorial6":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog6(), "Tutorial6");
                break;

            case "Tutorial7":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog7(), "Tutorial7");
                break;

            case "Tutorial8":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog8(), "Tutorial8");
                break;

            case "Tutorial9":
                _dialogManager.PlayDialog(DialogDictionaryProvider.TutorialDialog9(), "Tutorial9");
                break;
            }
        }
Ejemplo n.º 2
0
        private static void checkCodesInPlayerCenter(GameObject player)
        {
            Vector2 collisionCenter = player.GetCollisionCenter(player.PublicCollisionRectangle);

            foreach (string codePart in TileMap.GetCellCodes(TileMap.GetCellByPixel(collisionCenter)))
            {
                string[] codeArray = codePart.Split('_');
                switch (codeArray[0])
                {
                case "TRANSITION":
                    if (LevelManager.CurrentMap.Properties["Mode"] == "RPG")
                    {
                        StateManager.GameState = GameStates.RPG;
                    }
                    else if (LevelManager.CurrentMap.Properties["Mode"] == "Platform")
                    {
                        StateManager.GameState = GameStates.Platform;
                    }
                    IngameManager.Activate();
                    LevelManager.LoadLevel(codeArray[1]);
                    break;

                case "PIPE":
                    if (InputMapper.STRICTDOWN)
                    {
                        StateManager.GameState = GameStates.RPG;
                        RPGManager.Activate();
                    }
                    break;

                case "DIALOG":
                    if (InputMapper.STRICTACTION)
                    {
                        DialogManager.PlayDialog(DialogDictionaryProvider.GetDummyDialog(), "Test1");
                        StateManager.DialogState = DialogueStates.Active;
                    }
                    break;
                }
            }
        }