コード例 #1
0
        public override void Load()
        {
            sprMapMenuBackground = Content.Load <Texture2D>("Status Screen/Background Black");

            AttackPicker = new AttacksMenu();
            AttackPicker.Load();

            fntFinlanderFont = Content.Load <SpriteFont>("Fonts/Finlander Font");
        }
コード例 #2
0
        /// <summary>
        /// Create a sample
        /// </summary>
        protected BattleMap()
            : base()
        {
            RequireFocus     = true;
            MapSize          = new Point(10, 10);
            TileSize         = new Point(32, 32);
            ActiveLayerIndex = 0;
            ShowAllLayers    = true;

            IsFrozen      = false;
            OnlinePlayers = new OnlineConfiguration();

            GameTurn             = 0;
            ListTileSet          = new List <Texture2D>();
            ListBackgrounds      = new List <AnimationBackground>();
            ListBackgroundsPath  = new List <string>();
            ListForegrounds      = new List <AnimationBackground>();
            ListForegroundsPath  = new List <string>();
            ListActionMenuChoice = new ActionPanelHolder();
            ListMAPAttackTarget  = new Stack <Tuple <int, int> >();

            VictoryCondition   = "";
            LossCondition      = "";
            SkillPoint         = "";
            sndBattleThemeName = "";

            DicMapVariables   = new Dictionary <string, double>();
            MovementAnimation = new MovementAnimations();
            AttackPicker      = new AttacksMenu();

            ListMapScript     = new List <MapScript>();
            ListMapEvent      = new List <MapEvent>();
            DicCutsceneScript = new Dictionary <string, CutsceneScript>();
            DicRequirement    = new Dictionary <string, BaseSkillRequirement>();
            DicEffect         = new Dictionary <string, BaseEffect>();
            ListSubMap        = new List <BattleMap>();

            GlobalBattleContext = new BattleContext();

            #region Screen shaking

            ShakeCounter        = 0;
            ShakeRadiusMax      = 3;
            ShakeOffsetX        = 0;
            ShakeOffsetY        = 0;
            ShakeAngle          = RandomHelper.Next(360);
            ShakeAngleVariation = new Vector2(1, 0);

            #endregion
        }
コード例 #3
0
        public override void Load()
        {
            if (!IsServer)
            {
                AttackPicker = new AttacksMenu(ActiveParser);

                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>("Cursors/Reticle");
                sprCursorPath = Content.Load <Texture2D>("Cursors/Cursor Path");
                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");

                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
            }

            LoadMapScripts();
            LoadEffects();
            LoadAutomaticSkillActivation();
            LoadManualSkillActivation();
            LoadSkillRequirements();
            LoadCutsceneScripts();
            LoadInteractiveProps();
            LoadUnits();
        }