Exemplo n.º 1
0
        private void LoadFighters(Resources res, GameHandler gameHandler)
        {
            for (int i = 0; i < /*this.enemyIDs.Count()*/ 1; i++)
            {
                this.enemies.Add(new EnemyFighter(this.enemyIDs[i], gameHandler.lastEncounteredEnemy.level, enemyScreenPositions[i]));
                this.enemies[i].LoadContent(res);
                this.aliveEnemyPositions.Add(i);
            }
            this.enemyTemplate = enemies[0];

            this.removedCounter = 0;

            this.player = new PlayerFighter(playerScreenPos);

            this.player.attackList = MoveLoader.ConvertIDsToMoves(gameHandler.worldData.unlockedSkillIDs);
            for (int i = 0; i < this.player.attackList.Count(); i++)
            {
                List <FrameAnim> primaryAnims = new List <FrameAnim>();
                for (int j = 0; j < res.MovePrimaryAnimsPerMove[Move.ID_DICT[this.player.attackList[i].moveName]].Count(); j++)
                {
                    primaryAnims.Add(res.MovePrimaryAnims[res.MovePrimaryAnimsPerMove[Move.ID_DICT[this.player.attackList[i].moveName]][j]]);
                }
                this.player.attackList[i].LoadContent(primaryAnims, res.MoveSecondaryAnims[Move.ID_DICT[player.attackList[i].moveName]]);
                this.player.attackList[i].PrimeMove(player.standbyScreenPos, enemies[0].curScreenPos, 50, .35);
            }
        }
Exemplo n.º 2
0
        public Resources(ContentManager content)   //Constructor to load all of the content into the variables
        {
            this.contentPath = content.RootDirectory;

            this.Menu_Title = content.Load <Texture2D>("Textures/Menu/Title");

            this.Menu_Font              = content.Load <SpriteFont>("Fonts/MenuFont");
            this.Menu_CreationFont      = content.Load <SpriteFont>("Fonts/MenuFont");
            this.Menu_MousePointer      = content.Load <Texture2D>("Textures/Menu/MousePointer");
            this.Menu_MousePointer_anim = content.Load <Texture2D>("Textures/Menu/MousePointer_anim");

            this.Menu_Background    = content.Load <Texture2D>("Textures/Menu/Background2");
            this.Menu_CreationFrame = content.Load <Texture2D>("Textures/Menu/CreationFrame");

            this.Menu_TypeBox           = content.Load <Texture2D>("Textures/Menu/TypeBoxFrame");
            this.Menu_ListClicker_Arrow = content.Load <Texture2D>("Textures/Menu/Arrow");

            this.Menu_HSVSlider_Pointer = content.Load <Texture2D>("Textures/Menu/Slider_Pointer");
            this.Menu_HSVSlider_Base    = content.Load <Texture2D>("Textures/Menu/Slider_Base");
            this.Menu_HSVSlider_H       = content.Load <Texture2D>("Textures/Menu/Slider_H");
            this.Menu_HSVSlider_S       = content.Load <Texture2D>("Textures/Menu/Slider_S");
            this.Menu_HSVSlider_V       = content.Load <Texture2D>("Textures/Menu/Slider_V");

            this.Menu_CharPrev_Frame = content.Load <Texture2D>("Textures/Menu/CharPrevFrame");

            this.Menu_CharCreation_ManaGlow = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Body/ManaGlow");
            this.Menu_CharCreation_Skin     = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Body/Skin");
            this.Menu_CharCreation_Bottom   = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Body/Bottom");
            this.Menu_CharCreation_Shirt    = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Body/Shirt");


            this.Menu_CharCreation_Hair_1 = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Hairstyles/1");

            this.Menu_NextButton = content.Load <Texture2D>("Textures/Menu/NextButtonFrame");

            this.Menu_Stats_Minus = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Minus");
            this.Menu_Stats_Plus  = content.Load <Texture2D>("Textures/Menu/CharacterCreation/Plus");

            this.Menu_Stats_ATK = content.Load <Texture2D>("Textures/Menu/CharacterCreation/ATK");
            this.Menu_Stats_DEF = content.Load <Texture2D>("Textures/Menu/CharacterCreation/DEF");
            this.Menu_Stats_VIT = content.Load <Texture2D>("Textures/Menu/CharacterCreation/VIT");
            this.Menu_Stats_DEX = content.Load <Texture2D>("Textures/Menu/CharacterCreation/DEX");
            this.Menu_Stats_INT = content.Load <Texture2D>("Textures/Menu/CharacterCreation/INT");
            this.Menu_Stats_WIS = content.Load <Texture2D>("Textures/Menu/CharacterCreation/WIS");
            this.Menu_Stats_VIR = content.Load <Texture2D>("Textures/Menu/CharacterCreation/VIR");
            this.Menu_Stats_EVL = content.Load <Texture2D>("Textures/Menu/CharacterCreation/EVL");
            this.Menu_Stats_LUK = content.Load <Texture2D>("Textures/Menu/CharacterCreation/LUK");

            this.Menu_Stats_HoverTextBackground = content.Load <Texture2D>("Textures/Menu/HoverBoxTextBackground");

            this.Menu_Continue_Frame             = content.Load <Texture2D>("Textures/Menu/ContinueMenu/ContinueFrame");
            this.Menu_Continue_SaveBar           = content.Load <Texture2D>("Textures/Menu/ContinueMenu/SaveBar");
            this.Menu_Continue_FuncButton_Play   = content.Load <Texture2D>("Textures/Menu/ContinueMenu/FuncButton_Play");
            this.Menu_Continue_FuncButton_Delete = content.Load <Texture2D>("Textures/Menu/ContinueMenu/FuncButton_Delete");

            this.Menu_LoadingAnim = content.Load <Texture2D>("Textures/Menu/Hourglass_Anim");


            this.Icons_Frame = content.Load <Texture2D>("Textures/Icons/Frame");

            this.Icons_GenderIcons_Female = content.Load <Texture2D>("Textures/Icons/Gender/Female");
            this.Icons_GenderIcons_Male   = content.Load <Texture2D>("Textures/Icons/Gender/Male");


            this.Tilesets_test1 = content.Load <Texture2D>("Textures/World/Tilesets/test1");

            this.TileAnims_Water = content.Load <Texture2D>("Textures/World/Tilesets/Anims/water_anim");


            this.FrameAnim_test1 = content.Load <Texture2D>("Textures/World/Entities/animTest1");

            this.Player_testAnim1          = content.Load <Texture2D>("Textures/World/Entities/Player/testPlayer");
            this.Player_Affinity_ManaPulse = content.Load <SoundEffect>("Sounds/Wave1");

            this.NPC_VillagerAnim = content.Load <Texture2D>("Textures/World/Entities/NPCs/Villager_anim");

            this.Enemy_Slime = content.Load <Texture2D>("Textures/World/Entities/Enemies/Slime");


            this.World_Interaction_TalkWindowAnim = content.Load <Texture2D>("Textures/World/FX/TalkWindow_anim");
            this.World_Interaction_TalkWindowOpen = content.Load <Texture2D>("Textures/World/FX/TalkWindow");

            this.Minimap_Border         = content.Load <Texture2D>("Textures/World/Minimap/Border");
            this.Minimap_Border_Outline = content.Load <Texture2D>("Textures/World/Minimap/Border_outline");
            this.Minimap_Fill           = content.Load <Texture2D>("Textures/World/Minimap/Fill");
            this.Minimap_Outline        = content.Load <Texture2D>("Textures/World/Minimap/Outline");
            this.Minimap_Icon_Player    = content.Load <Texture2D>("Textures/World/Minimap/Icon_Player_Small");
            this.Minimap_Icon_Enemy     = content.Load <Texture2D>("Textures/World/Minimap/Icon_Enemy");

            this.Minimap_MaskTex    = content.Load <Texture2D>("Textures/World/Minimap/MaskTex");
            this.Minimap_MapTex     = content.Load <Texture2D>("Textures/World/Minimap/MapTex");
            this.Minimap_MaskBorder = content.Load <Texture2D>("Textures/World/Minimap/MaskBorder");



            this.Inventory_Square_Empty = content.Load <Texture2D>("Textures/Inventory/Square_Blank");
            this.Inventory_Square_Full  = content.Load <Texture2D>("Textures/Inventory/Square_Item");

            this.Inventory_ArrowAnim_Right = content.Load <Texture2D>("Textures/Inventory/InventoryArrowAnim_Right");
            this.Inventory_ArrowAnim_Left  = content.Load <Texture2D>("Textures/Inventory/InventoryArrowAnim_Left");

            this.Inventory_ExpBar_Frame    = content.Load <Texture2D>("Textures/Inventory/ExpBar_Empty");
            this.Inventory_ExpBar_Fill     = content.Load <Texture2D>("Textures/Inventory/ExpBar_Full");
            this.Inventory_ExpBar_Indexers = content.Load <Texture2D>("Textures/Inventory/ExpBar_Indexers");


            this.Battle_CountDownFont = content.Load <SpriteFont>("Fonts/BattleCountdownFont");
            this.Battle_HealthFont    = content.Load <SpriteFont>("Fonts/BattleHealthFont");

            this.Battle_FadeRect = content.Load <Texture2D>("Textures/Battle/FadeScreen");

            this.Battle_BackgroundTexList.Add(content.Load <Texture2D>("Textures/Battle/Stage/Backgrounds/Stars"));
            this.Battle_FloorTexList.Add(content.Load <Texture2D>("Textures/Battle/Stage/Floors/Test1"));

            this.Battle_UI_HealthBarEmpty = content.Load <Texture2D>("Textures/Battle/UI/HealthBar_Base");
            this.Battle_UI_HealthBarFull  = content.Load <Texture2D>("Textures/Battle/UI/HealthBar_Full");

            this.Battle_UI_OptionWheel_HighlighterSpriteSheet = content.Load <Texture2D>("Textures/Battle/UI/WheelOption_Highlight");

            this.Battle_UI_OptionWheel_Fight = content.Load <Texture2D>("Textures/Battle/UI/WheelOption_Fight");
            this.Battle_UI_OptionWheel_Item  = content.Load <Texture2D>("Textures/Battle/UI/WheelOption_Item");
            this.Battle_UI_OptionWheel_Pass  = content.Load <Texture2D>("Textures/Battle/UI/WheelOption_Pass");
            this.Battle_UI_OptionWheel_Flee  = content.Load <Texture2D>("Textures/Battle/UI/WheelOption_Flee");

            this.Battle_UI_SelectorArrowSpriteSheet = content.Load <Texture2D>("Textures/Battle/UI/EnemySelector");


            Move.LoadMoveDictionary(); //This has to be done to make the id/name dictionaries

            //Loading all of the player animations for all attacks
            MovePrimaryAnims.Add(new FrameAnim(this.Player_testAnim1, 8, 32, 32, 25, true, true)); //0: Move.PRIMARY_SHOOT
            //

            //Loading the projectile, aura, etc animation sheets for moves
            FrameAnim Battle_Move_Anim_Flare = new FrameAnim(content.Load <Texture2D>("Textures/Battle/Moves/Flare"), 4, 32, 32, 12, true, true);

            this.MovePrimaryAnimsPerMove.Add(Move.ID_DICT["Flare"], new List <int>()
            {
                Move.PRIMARY_SHOOT
            });
            this.MoveSecondaryAnims.Add(Move.ID_DICT["Flare"], new List <FrameAnim>()
            {
                Battle_Move_Anim_Flare
            });
            //

            //Loading all move icons --- This can be a for loop like with the directory file count and stuff but ill do it later
            for (int i = 0; i < Move.ID_DICT.Keys.Count(); i++)
            {
                this.MoveIconTexDict.Add(i, content.Load <Texture2D>("Textures/Battle/Moves/Icons/" + Move.NAME_DICT[i]));
            }
            //



            this.Battle_FighterShadow = content.Load <Texture2D>("Textures/Battle/FighterShadow");


            this.MoveDataStreamDirPath = this.contentPath + "/BattleData/MoveData";
            List <String> moveFilePathList = Directory.GetFiles(MoveDataStreamDirPath).ToList();

            for (int i = 0; i < moveFilePathList.Count(); i++)
            {
                //System.Diagnostics.Debug.WriteLine(moveFilePathList[i]);
                //MoveDataStreamList.Add(content.Load<FileStream>("BattleData/MoveData/" + moveFilePathList[i])); //This needs to be split to only include the name of the file, not the folder path or file extension
            }

            //EnemyData.Create(); //This makes new files for the enemy animation data; this should be commented out in the final version, it just exists toeract  generate the binary files
            EnemyData.Construct(); //This reads the already-existing enemy animation data

            LoadBattleAssets(content, "Textures/Battle/Fighters");

            MoveLoader.LoadContent(this);


            this.Debug_BoundsRect = content.Load <Texture2D>("Textures/World/Debug/boundsRect");
        }