Esempio n. 1
0
        public override void Load()
        {
            ListPresentUnit = PlayerRoster.TeamUnits.GetPresent();

            UnitSelectionMenu = new DrawableMenu(DrawMenuItem, ListPresentUnit.Count, 5);

            sprMapMenuBackground = Content.Load <Texture2D>("Status Screen/Background Black");

            sprBarLargeBackground = Content.Load <Texture2D>("Battle/Bars/Large Bar");
            sprBarLargeEN         = Content.Load <Texture2D>("Battle/Bars/Large Energy");
            sprBarLargeHP         = Content.Load <Texture2D>("Battle/Bars/Large Health");

            sprLand  = Content.Load <Texture2D>("Status Screen/Ground");
            sprSea   = Content.Load <Texture2D>("Status Screen/Sea");
            sprSky   = Content.Load <Texture2D>("Status Screen/Sky");
            sprSpace = Content.Load <Texture2D>("Status Screen/Space");

            sndConfirm   = new FMODSound(FMODSystem, "Content/SFX/Confirm.mp3");
            sndDeny      = new FMODSound(FMODSystem, "Content/SFX/Deny.mp3");
            sndSelection = new FMODSound(FMODSystem, "Content/SFX/Selection.mp3");
            sndCancel    = new FMODSound(FMODSystem, "Content/SFX/Cancel.mp3");

            fntFinlanderFont = Content.Load <SpriteFont>("Fonts/Finlander Font");
            StatusMenu       = new StatusMenuScreen(null);
            StatusMenu.Load();
        }
        public override void Load()
        {
            sndConfirm   = new FMODSound(FMODSystem, "Content/SFX/Confirm.mp3");
            sndDeny      = new FMODSound(FMODSystem, "Content/SFX/Deny.mp3");
            sndSelection = new FMODSound(FMODSystem, "Content/SFX/Selection.mp3");
            sndCancel    = new FMODSound(FMODSystem, "Content/SFX/Cancel.mp3");

            #region Init outline shader.

            fxOutline = Content.Load <Effect>("Shaders/Outline");
            Matrix Projection      = Matrix.CreateOrthographicOffCenter(0, Constants.Width, Constants.Height, 0, 0, -1f);
            Matrix HalfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);

            Matrix projectionMatrix = HalfPixelOffset * Projection;

            fxOutline.Parameters["World"].SetValue(Matrix.Identity);
            fxOutline.Parameters["View"].SetValue(Matrix.Identity);
            fxOutline.Parameters["Projection"].SetValue(projectionMatrix);

            fxOutline.Parameters["TextureOffset"].SetValue(new Vector2(1, 1));

            #endregion

            #region Fonts

            fntPhaseNumber         = Content.Load <SpriteFont>("Battle/Phase/Number");
            fntPhaseNumber.Spacing = -5;
            fntUnitAttack          = Content.Load <SpriteFont>("Fonts/Arial16");
            fntArial12             = Content.Load <SpriteFont>("Fonts/Arial12");
            fntArial10             = Content.Load <SpriteFont>("Fonts/Arial10");
            fntArial9                    = Content.Load <SpriteFont>("Fonts/Arial9");
            fntNumbers                   = Content.Load <SpriteFont>("Fonts/VFfont");
            fntBattleMenuText            = Content.Load <SpriteFont>("Fonts/Battle Menu Text");
            fntAccuracyNormal            = Content.Load <SpriteFont>("Fonts/Accuracy Normal");
            fntAccuracySmall             = Content.Load <SpriteFont>("Fonts/Accuracy Small");
            fntNonDemoDamage             = Content.Load <SpriteFont>("Fonts/Battle Damage");
            fntNonDemoDamage.Spacing     = -5;
            fntBattleNumberSmall         = Content.Load <SpriteFont>("Fonts/Battle Numbers Small");
            fntBattleNumberSmall.Spacing = -3;

            #endregion

            StatusMenu = new StatusMenuScreen(this);
            AttackPicker.Load();
            fntFinlanderFont = Content.Load <SpriteFont>("Fonts/Finlander Font");

            fxGrayscale = Content.Load <Effect>("Shaders/Grayscale");

            sprEllipse   = Content.Load <Texture2D>("Ellipse");
            sprCursor    = Content.Load <Texture2D>("Battle/Reticle");
            sprUnitHover = Content.Load <Texture2D>("Units/Unit Hover");

            sprPhaseBackground = Content.Load <Texture2D>("Battle/Phase/Background");
            sprPhasePlayer     = Content.Load <Texture2D>("Battle/Phase/Player");
            sprPhaseEnemy      = Content.Load <Texture2D>("Battle/Phase/Enemy");
            sprPhaseTurn       = Content.Load <Texture2D>("Battle/Phase/Turn");

            LoadMapScripts();
            LoadEffects();
            LoadAutomaticSkillActivation();
            LoadManualSkillActivation();
            LoadSkillRequirements();
            LoadScripts();
            LoadUnits();

            sprCursorTerrainSelection = Content.Load <Texture2D>("Battle/Cursor/Terrain Selection");

            #region Bars

            sprBarSmallBackground      = Content.Load <Texture2D>("Battle/Bars/Small Bar");
            sprBarSmallEN              = Content.Load <Texture2D>("Battle/Bars/Small Energy");
            sprBarSmallHP              = Content.Load <Texture2D>("Battle/Bars/Small Health");
            sprBarLargeBackground      = Content.Load <Texture2D>("Battle/Bars/Large Bar");
            sprBarLargeEN              = Content.Load <Texture2D>("Battle/Bars/Large Energy");
            sprBarLargeHP              = Content.Load <Texture2D>("Battle/Bars/Large Health");
            sprBarExtraLargeBackground = Content.Load <Texture2D>("Battle/Bars/Extra Long Bar");
            sprBarExtraLargeEN         = Content.Load <Texture2D>("Battle/Bars/Extra Long Energy");
            sprBarExtraLargeHP         = Content.Load <Texture2D>("Battle/Bars/Extra Long Health");

            #endregion
        }