Inheritance: MSGUIUnclickable
Example #1
0
        private MSMoodManager()
            : base(MoodSwing.GetInstance())
        {
            povertyProgressBar = new MSMDGProgressBar
            (
                new Rectangle(587, 41, 48, 35),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/1"),
                Game.Content.Load<Texture2D>("GamePanel/a"),
                Game.Content.Load<Texture2D>("GamePanel/10"),
                Game.Content.Load<Texture2D>("Pamatong/4"),
                MSProgressBar.Orientation.VERTICAL
            );

            educationProgressBar = new MSMDGProgressBar
            (
                new Rectangle(639, 34, 31, 39),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/2"),
                Game.Content.Load<Texture2D>("GamePanel/b"),
                Game.Content.Load<Texture2D>("GamePanel/20"),
                Game.Content.Load<Texture2D>("Pamatong/5"),
                MSProgressBar.Orientation.VERTICAL
            );

            genderEqualityProgressBar = new MSMDGProgressBar
            (
                new Rectangle(682, 36, 38, 34),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/3"),
                Game.Content.Load<Texture2D>("GamePanel/c"),
                Game.Content.Load<Texture2D>("GamePanel/30"),
                Game.Content.Load<Texture2D>("Pamatong/6"),
                MSProgressBar.Orientation.VERTICAL
            );

            childHealthProgressBar = new MSMDGProgressBar
            (
                new Rectangle(721, 31, 45, 36),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/4"),
                Game.Content.Load<Texture2D>("GamePanel/d"),
                Game.Content.Load<Texture2D>("GamePanel/40"),
                Game.Content.Load<Texture2D>("Pamatong/7"),
                MSProgressBar.Orientation.VERTICAL
            );

            maternalHealthProgressBar = new MSMDGProgressBar
            (
                new Rectangle(770, 25, 37, 39),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/5"),
                Game.Content.Load<Texture2D>("GamePanel/e"),
                Game.Content.Load<Texture2D>("GamePanel/50"),
                Game.Content.Load<Texture2D>("Pamatong/8"),
                MSProgressBar.Orientation.VERTICAL
            );

            hivAidsProgressBar = new MSMDGProgressBar
            (
                new Rectangle(813, 28, 37, 33),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/6"),
                Game.Content.Load<Texture2D>("GamePanel/f"),
                Game.Content.Load<Texture2D>("GamePanel/60"),
                Game.Content.Load<Texture2D>("Pamatong/9"),
                MSProgressBar.Orientation.VERTICAL
            );

            environmentProgressBar = new MSMDGProgressBar
            (
                new Rectangle(856, 23, 51, 33),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/7"),
                Game.Content.Load<Texture2D>("GamePanel/g"),
                Game.Content.Load<Texture2D>("GamePanel/70"),
                Game.Content.Load<Texture2D>("Pamatong/10"),
                MSProgressBar.Orientation.VERTICAL
            );

            globalPartnershipProgressBar = new MSMDGProgressBar
            (
                new Rectangle(908, 17, 45, 31),
                (Game as MoodSwing).SpriteBatch,
                Game,
                Game.Content.Load<Texture2D>("GamePanel/8"),
                Game.Content.Load<Texture2D>("GamePanel/h"),
                Game.Content.Load<Texture2D>("GamePanel/80"),
                Game.Content.Load<Texture2D>("Pamatong/11"),
                MSProgressBar.Orientation.VERTICAL
            );

            bars = new MSMDGProgressBar[8];
            bars[0] = povertyProgressBar;
            bars[1] = educationProgressBar;
            bars[2] = genderEqualityProgressBar;
            bars[3] = childHealthProgressBar;
            bars[4] = maternalHealthProgressBar;
            bars[5] = hivAidsProgressBar;
            bars[6] = environmentProgressBar;
            bars[7] = globalPartnershipProgressBar;

            numUltiBuilt = 0;

            PovertyUltiBuilt = false;
            EducationUltiBuilt = false;
            GenderUltiBuilt = false;
            ChildUltiBuilt = false;
            MaternalUltiBuilt = false;
            HivUltiBuilt = false;
            EnvironmentUltiBuilt = false;
            GlobalUltiBuilt = false;
        }
Example #2
0
 private void AddScore(ref float score_variable, ref bool score_enabled, ref MSMDGProgressBar bar)
 {
     if (score_enabled && bar.Visible)
     {
         score_variable += PERSON_HELPED_SCORE_INCREASE;
         if (score_variable > 1)
         {
             score_variable = 1;
             mood += MDG_COMPLETE_MOOD_BONUS;
             score_enabled = false;
         }
         bar.Progress = score_variable;
     }
 }