Exemple #1
0
        public static void ShowGoalPopup(MissionGoal goal, int amount)
        {
            LevelGoalPopup newP = new LevelGoalPopup(graphics, font, GOAL_WIDTH, GOAL_HEIGHT);

            newP.Show(windowWidth, windowHeight, goal, amount);
            goalPopups.Add(newP);
        }
Exemple #2
0
        public LevelObjectiveDisplay(SpriteFont font, int x, int y, Mission mission)
        {
            this.font = font;

            goalImg  = Utilities.GetImgOfGoal(mission.Goal);
            goalRect = new Rectangle(x, y, SIZE, SIZE);

            int amount = 0;

            switch (mission.Goal)
            {
            case MissionGoal.DestroyMechanics:
                amount = mission.MechAliens;
                break;

            case MissionGoal.SavePeople:
                amount = mission.Cages;
                break;
            }
            subtitle    = LevelGoalPopup.TextFor(mission.Goal, amount);
            subtitleLoc = new Vector2(x + SIZE / 2 - font.MeasureString(subtitle).X / 2, goalRect.Bottom + SPACING);
        }