コード例 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            GlobalState.CURRENT_MAP_NAME = "STREET";

            ResourceManager.LoadResources(Content);
            CardDataManager.ReadCardData();

            if (File.Exists("InputConfig.dat"))
            {
                using (InputConfigLoader inputConfigWriter = new InputConfigLoader($"{_baseFolder}InputConfig.dat"))
                {
                    inputConfigWriter.LoadInputConfig();
                }
            }
            else
            {
                SetDefaultKeys();
                using (InputConfigWriter inputConfigWriter = new InputConfigWriter($"{_baseFolder}InputConfig.dat"))
                {
                    inputConfigWriter.WriteInputConfig();
                }
            }

            if (KeyInput.IsNintendoController)
            {
                KeyInput.SwapFaceButtons();
            }

            DialogueManager.LoadDialogue(Language.EN);

            bwEffect = Content.Load <Effect>("effects/blackwhite");

            bwEffect.CurrentTechnique = bwEffect.Techniques["BasicColorDrawing"];
            //bwEffect.Parameters["Cutoff"].SetValue(DrawingUtilities.GetDrawingZ(DrawOrder.FG_SPRITES, 0));
        }
コード例 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            ResourceManager.LoadResources(Content);
            CardDataManager.ReadCardData();

            if (File.Exists("InputConfig.dat"))
            {
                using InputConfigLoader inputConfigWriter = new InputConfigLoader($"{BaseFolder}InputConfig.dat");
                inputConfigWriter.LoadInputConfig();
            }
            else
            {
                SetDefaultKeys();
                using InputConfigWriter inputConfigWriter = new InputConfigWriter($"{BaseFolder}InputConfig.dat");
                inputConfigWriter.WriteInputConfig();
            }

            DialogueManager.Reload();

            SpriteDrawer.Load(Content);

            foreach (var effect in GlobalState.AllEffects)
            {
                effect.Load(Content, graphics.GraphicsDevice);
            }
        }