Exemplo n.º 1
0
        public void LoadContent(BossFight bossFight)
        {
            inGame = this;
            this.bossFight = bossFight;

            //botBlackTexture = contentManager.Load<Texture2D>("images/bottom_black");
            //backgroundTexture = contentManager.Load<Texture2D>(bossFight.getBGString());
            //foregroundTexture = contentManager.Load<Texture2D>("images/fg");

            targetTexture = GameBox.loadTexture("images/target");

            moveables = new List<Moveable>();

            abilityButton1 = new Button(new IntRect(650, 560, 35, 35));
            abilityButton2 = new Button(new IntRect(700, 560, 35, 35));
            abilityButton3 = new Button(new IntRect(750, 560, 35, 35));

            projectiles = new List<Projectile>();
            projectilesToAdd = new List<Projectile>();
            projectilesToRemove = new List<Projectile>();
            groundEffects = new List<GroundEffect>();
            groundEffectsToRemove = new List<GroundEffect>();

            damageMeter = new DamageMeter();
            activeScripts = bossFight.getTimedScripts();

            fightObjects = bossFight.getObjects();

            //gfx stuff
            selectedCoordText = new Text("selected coord", GameBox.corbalFont, 15U);
            selectedCoordText.Position = new Vector2f(10, 560);
            selectedCoordText.Color = Color.Yellow;
            firstCooldownText = new Text("first cd", GameBox.corbalFont, 15U);
            firstCooldownText.Position = new Vector2f(300, 550);
            firstCooldownText.Color = Color.White;
            secondCooldownText = new Text("second cd", GameBox.corbalFont, 15U);
            secondCooldownText.Position = new Vector2f(300, 565);
            secondCooldownText.Color = Color.White;
            bossCooldownText = new Text("boss cd", GameBox.corbalFont, 15U);
            bossCooldownText.Position = new Vector2f(300, 575);
            bossCooldownText.Color = Color.White;
            enrageText = new Text("ENRAGE OHHHHHH SHIT SON", GameBox.corbalFont, 15U);
            enrageText.Position = new Vector2f(375, 5);
            enrageText.Color = Color.Red;
            damagemeterText = new Text("damagemeter", GameBox.corbalFont, 15U);
            firstThreatText = new Text("first threat", GameBox.corbalFont, 15U);
            firstThreatText.Position = new Vector2f(15, 15);
            firstThreatText.Color = Color.White;
            secondThreatText = new Text("second threat", GameBox.corbalFont, 15U);
            secondThreatText.Position = new Vector2f(15, 30);
            secondThreatText.Color = Color.White;
            thirdThreatText = new Text("third threat", GameBox.corbalFont, 15U);
            thirdThreatText.Position = new Vector2f(15, 45);
            thirdThreatText.Color = Color.White;
            fightStatusText = new Text("fightstatus", GameBox.corbalFont, 15U);
            fightStatusText.Position = new Vector2f(50, 520);
            fightStatusText.Color = Color.White;
            countDownText = new Text("countDown", GameBox.corbalFont, 15U);
            countDownText.Position = new Vector2f(400, 520);
            countDownText.Color = Color.White;

            //shouldnt load here
            hpBarSprite = new Sprite(GameBox.loadTexture("images/UI/insideFrame"));
            hpBarSprite.Position = new Vector2f(500, 550);
            hpBarSprite.Color = Color.Red;

            currentCursorSprite = new Sprite();
        }
Exemplo n.º 2
0
        internal PostFight(BossFightID id, double timeSecond, int playerAmt, DamageMeter damageMeter, bool win, int enrageTimer, Hashtable lastRaid)
        {
            nextButton = new Button(new IntRect(571, 526, 195, 61));
            restartButton = new Button(new IntRect(234, 526, 191, 64));
            reformPartyButton = new Button(new IntRect(16, 501, 158, 75));

            this.id = id;
            this.timeSecond = timeSecond;
            this.playerAmt = playerAmt;
            this.damageMeter = damageMeter;
            this.win = win;
            this.enrageTimer = enrageTimer;
            this.lastRaid = lastRaid;

            fightStars = BossSelect.getBossStarInfo(id);
            fightRecord = BossFightLibrary.getBossFightRecord(id);
            //update starInfo from last fight
            if (win) {
                fightStars.winStar = win;
                if (playerAmt < fightStars.smallest) {
                    fightStars.smallest = playerAmt;
                    if(playerAmt < fightRecord.smallAmtForStars[0]){
                        fightStars.smallStars[0] = true;
                        fightStars.smallStars[1] = true;
                        fightStars.smallStars[2] = true;
                    } else if (playerAmt < fightRecord.smallAmtForStars[1]) {
                        fightStars.smallStars[1] = true;
                        fightStars.smallStars[2] = true;
                    } else if (fightRecord.smallAmtForStars.Length > 2 && playerAmt < fightRecord.smallAmtForStars[2]) {
                        fightStars.smallStars[2] = true;
                    }
                }
                if (timeSecond < fightStars.seconds) {
                    fightStars.seconds = timeSecond;
                    if (this.timeSecond < fightRecord.timeForStars[0]) {
                        fightStars.timeStars[0] = true;
                        fightStars.timeStars[1] = true;
                        fightStars.timeStars[2] = true;
                    } else if (timeSecond < fightRecord.timeForStars[1]) {
                        fightStars.timeStars[1] = true;
                        fightStars.timeStars[2] = true;
                    } else if (timeSecond < fightRecord.timeForStars[2]) {
                        fightStars.timeStars[2] = true;
                    }
                }

            }
            //make gfx stuff
            postScreenSprite = new Sprite(postScreen);
            postScreenSprite.Position = new Vector2f(0, 0);
            winSprite = new Sprite();
            winSprite.Position = new Vector2f(303, 43);
            smallStarSprite1 = new Sprite();
            smallStarSprite1.Position = new Vector2f(103, 178);
            smallStarSprite2 = new Sprite();
            smallStarSprite2.Position = new Vector2f(103, 200);
            smallStarSprite3 = new Sprite();
            smallStarSprite3.Position = new Vector2f(103, 222);
            timeStarSprite1 = new Sprite();
            timeStarSprite1.Position = new Vector2f(623, 178);
            timeStarSprite2 = new Sprite();
            timeStarSprite2.Position = new Vector2f(623, 200);
            timeStarSprite3 = new Sprite();
            timeStarSprite3.Position = new Vector2f(623, 222);

            winStatusText = new Text(id + " " + (win ? "Win" : "Lose"),GameBox.corbalFont,15U);
            winStatusText.Position = new Vector2f(338, 43);
            winStatusText.Color = Color.Black;
            playerAmtText = new Text(playerAmt + "", GameBox.corbalFont, 15U);
            playerAmtText.Position = new Vector2f(92, 120);
            playerAmtText.Color = Color.Black;
            smallestAmtText1 = new Text(fightRecord.smallAmtForStars[0] + "", GameBox.corbalFont, 15U);
            smallestAmtText1.Position = new Vector2f(122, 178);
            smallestAmtText1.Color = Color.Black;
            smallestAmtText2 = new Text(fightRecord.smallAmtForStars[1] + "", GameBox.corbalFont, 15U);
            smallestAmtText2.Position = new Vector2f(122, 200);
            smallestAmtText2.Color = Color.Black;
            enrageText = new Text(enrageTimer + "", GameBox.corbalFont, 15U);
            enrageText.Position = new Vector2f(621, 271);
            enrageText.Color = Color.Red;
            timeSecondsText = new Text(timeSecond + "", GameBox.corbalFont, 15U);
            timeSecondsText.Position = new Vector2f(621, 114);
            timeSecondsText.Color = Color.Black;
            timeForStarsText1 = new Text(fightRecord.timeForStars[0] + "", GameBox.corbalFont, 15U);
            timeForStarsText1.Position = new Vector2f(642, 178);
            timeForStarsText1.Color = Color.Black;
            timeForStarsText2 = new Text(fightRecord.timeForStars[1] + "", GameBox.corbalFont, 15U);
            timeForStarsText2.Position = new Vector2f(642, 200);
            timeForStarsText2.Color = Color.Black;
            timeForStarsText3 = new Text(fightRecord.timeForStars[2] + "", GameBox.corbalFont, 15U);
            timeForStarsText3.Position = new Vector2f(642, 222);
            timeForStarsText3.Color = Color.Black;
            dmgMeterText = new Text("dmgmeter", GameBox.corbalFont, 15U);
            //winStatusText, playerAmtText, smallestAmtText1, smallestAmtText2, enrageText,
            //    timeSecondsText, timeForStarsText1, timeForStarsText2, timeForStarsText3, dmgMeterText;
        }
Exemplo n.º 3
0
 internal void initPostFight(BossFightID id, double timeSecond, int playerAmt, DamageMeter damageMeter, bool win, int enrageTimer, Hashtable lastRaid) {
     inGame = null;
     //this.lastRaid = lastRaid;
     gameState = GameState.postFight;
     postFight = new PostFight(id, timeSecond, playerAmt, damageMeter, win, enrageTimer, lastRaid);
     BossSelect.updateTotalStars();
 }