Пример #1
0
        public MSMobber(Vector3 position, Node path, MSMap map, MSMilleniumDevelopmentGoal concern, float initRotation)
            : base(position, path, map, false, initRotation)
        {
            mobList = new List<MSMobber>();
            this.concern = concern;
            string moodFaceAssetName = "";
            switch (concern)
            {
                case MSMilleniumDevelopmentGoal.POVERTY:
                    moodFaceAssetName = "Moods/Hunger";
                    break;
                case MSMilleniumDevelopmentGoal.EDUCATION:
                    moodFaceAssetName = "Moods/Education";
                    break;
                case MSMilleniumDevelopmentGoal.GENDER_EQUALITY:
                    moodFaceAssetName = "Moods/Equality";
                    break;
                case MSMilleniumDevelopmentGoal.CHILD_HEALTH:
                    moodFaceAssetName = "Moods/Children";
                    break;
                case MSMilleniumDevelopmentGoal.MATERNAL_HEALTH:
                    moodFaceAssetName = "Moods/Maternity";
                    break;
                case MSMilleniumDevelopmentGoal.HIV_AIDS:
                    moodFaceAssetName = "Moods/Health";
                    break;
                case MSMilleniumDevelopmentGoal.ENVIRONMENT:
                    moodFaceAssetName = "Moods/Environment";
                    break;
                case MSMilleniumDevelopmentGoal.GLOBAL_PARTNERSHIP:
                    moodFaceAssetName = "Moods/Partnership";
                    break;
            }

            Vector3 screenProjection = Game.GraphicsDevice.Viewport.Project(Position, MSCamera.GetInstance().ProjectionMatrix, MSCamera.GetInstance().GetView(), Matrix.Identity);
            moodFace = new MSImageHolder(new Rectangle((int)screenProjection.X - 50, (int)screenProjection.Y - 50, 50, 50), Game.Content.Load<Texture2D>(moodFaceAssetName), MoodSwing.GetInstance().SpriteBatch, Game);
        }
Пример #2
0
 public void AddMDGScore(MSMilleniumDevelopmentGoal mdg)
 {
     switch (mdg)
     {
         case MSMilleniumDevelopmentGoal.POVERTY:
             AddScore(ref povertyScore, ref povertyBonusEnabled, ref povertyProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.EDUCATION:
             AddScore(ref educationScore, ref educationBonusEnabled, ref educationProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.GENDER_EQUALITY:
             AddScore(ref genderEqualityScore, ref genderEqualityBonusEnabled, ref genderEqualityProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.CHILD_HEALTH:
             AddScore(ref childHealthScore, ref childHleathBonusEnabled, ref childHealthProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.MATERNAL_HEALTH:
             AddScore(ref maternalHealthScore, ref maternalHealthBonusEnabled, ref maternalHealthProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.HIV_AIDS:
             AddScore(ref hivAidsScore, ref hivAidsBonusEnabled, ref hivAidsProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.ENVIRONMENT:
             AddScore(ref environmentScore, ref environmentBonusEnabled, ref environmentProgressBar);
             break;
         case MSMilleniumDevelopmentGoal.GLOBAL_PARTNERSHIP:
             AddScore(ref globalPartnershipScore, ref globalPartnershipBonusEnabled, ref globalPartnershipProgressBar);
             break;
     }
 }
Пример #3
0
 private MSMobParam getMobParam(MSMilleniumDevelopmentGoal? mdg)
 {
     if (mdg == null) return mobTypeParam[8];
     return mobTypeParam[(int)mdg];
 }
Пример #4
0
        public MSMobParam(MSMilleniumDevelopmentGoal? mdg)
        {
            timer = 0;
            IsPaused = false;
            IsEnabled = true;

            switch (mdg)
            {
                case MSMilleniumDevelopmentGoal.CHILD_HEALTH:
                    equation = new ChildHealthCurve();
                    break;
                case MSMilleniumDevelopmentGoal.EDUCATION:
                    equation = new EducationCurve();
                    break;
                case MSMilleniumDevelopmentGoal.ENVIRONMENT:
                    equation = new EnvironmentCurve();
                    break;
                case MSMilleniumDevelopmentGoal.GENDER_EQUALITY:
                    equation = new GenderEqualityCurve();
                    break;
                case MSMilleniumDevelopmentGoal.GLOBAL_PARTNERSHIP:
                    equation = new GlobalPartnershipCurve();
                    break;
                case MSMilleniumDevelopmentGoal.HIV_AIDS:
                    equation = new HivAidsCurve();
                    break;
                case MSMilleniumDevelopmentGoal.MATERNAL_HEALTH:
                    equation = new MaternalHealthCurve();
                    break;
                case MSMilleniumDevelopmentGoal.POVERTY:
                    equation = new PovertyCurve();
                    break;
                default:
                    equation = new NormalCitizenCurve();
                    break;
            }
        }
Пример #5
0
 public void SetMobEnabled(MSMilleniumDevelopmentGoal mdg, bool enabled)
 {
     mobTypeParam[(int)mdg].IsEnabled = enabled;
 }