Exemple #1
0
        protected BaseScript()
        {
            Utils.Initialize(AppDomain.CurrentDomain.GetAssemblies().First(a => a.GetName().Name == "Secrets Of Grindea"));

            ModContent = new ContentManager(Utils.GetTheGame().Content.ServiceProvider, "ModContent/" + this.GetType().Name);

            Console.WriteLine(this.GetType().Name + " ContentManager path set as " + ModContent.RootDirectory);

            _game = Utils.GetTheGame();

            LocalGame = new LocalGame(_game);

            SpriteBatch = (SpriteBatch)Utils.GetGameType("SoG.Game1").
                          GetField("spriteBatch", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(_game);

            LocalPlayer = new Player(_game.xLocalPlayer);
        }
Exemple #2
0
        public static void AddDialogueLineTo(LocalGame localGame, string line)
        {
            var game = localGame.GetUnderlayingGame();

            game.xInGameMenu.TrueExit();
            game.xShopMenu.ExitShop();
            game.xInput_Game.MenuButton.bPressed = false;

            game._Input_StopAllMovement();

            bool bInDialogueBefore = game.xDialogueSystem.bInDialogue;

            game.xDialogueSystem.SetCustomLineDialogue(line);
            if (bInDialogueBefore)
            {
                game.xDialogueSystem.iFadeCount = 0;
            }
            game.xInput_Game.Action.bDown = true;
        }