コード例 #1
0
ファイル: MSTower.cs プロジェクト: verngutz/MoodSwing
 public MSTower(String model, String texture, String effect, Vector3 position, float rotation, int row, int column, int height, MSTowerStats stats)
     : base(model, texture, effect, position, rotation, row, column, height)
 {
     this.Stats = stats;
     if( stats != null ) capacity = stats.GetVolunteerCost();
     this.targetList = new List<MSUnit>();
     System.Console.WriteLine(capacity);
 }
コード例 #2
0
ファイル: MSTower.cs プロジェクト: verngutz/MoodSwing
        public override void load(System.IO.StreamReader sr)
        {
            base.load(sr);
            string stat = sr.ReadLine();
            if (stat.Equals("MSAntiretroviralCenterStats"))
            {
                this.Stats = MSAntiretroviralCenterStats.GetInstance();
            }
            else if (stat.Equals("MSApartmentStats"))
            {
                this.Stats = MSApartmentStats.GetInstance();
            }
            else if (stat.Equals("MSBedNetsCenterStats"))
            {
                this.Stats = MSBedNetsCenterStats.GetInstance();
            }
            else if (stat.Equals("MSChildrensHospitalStats"))
            {
                this.Stats = MSChildrensHospitalStats.GetInstance();
            }
            else if (stat.Equals("MSChildrensLibraryStats"))
            {
                this.Stats = MSChildrensLibraryStats.GetInstance();
            }
            else if (stat.Equals("MSEFASchoolStats"))
            {
                this.Stats = MSEFASchoolStats.GetInstance();
            }
            else if (stat.Equals("MSEmploymentCenterStats"))
            {
                this.Stats = MSEmploymentCenterStats.GetInstance();
            }
            else if (stat.Equals("MSEnvironmentalCenterStats"))
            {
                this.Stats = MSEnvironmentalCenterStats.GetInstance();
            }
            else if (stat.Equals("MSEpidemicsClinicStats"))
            {
                this.Stats = MSEpidemicsClinicStats.GetInstance();
            }
            else if (stat.Equals("MSFistulaTreatmentCenterStats"))
            {
                this.Stats = MSFistulaTreatmentCenterStats.GetInstance();
            }
            else if (stat.Equals("MSGeneralClinicStats"))
            {
                this.Stats = MSGeneralClinicStats.GetInstance();
            }
            else if (stat.Equals("MSGeneralRefugeStats"))
            {
                this.Stats = MSGeneralRefugeStats.GetInstance();
            }
            else if (stat.Equals("MSImmunizationOutreachStats"))
            {
                this.Stats = MSImmunizationOutreachStats.GetInstance();
            }
            else if (stat.Equals("MSInternationalCenterStats"))
            {
                this.Stats = MSInternationalCenterStats.GetInstance();
            }
            else if (stat.Equals("MSMaternalCareCenterStats"))
            {
                this.Stats = MSMaternalCareCenterStats.GetInstance();
            }
            else if (stat.Equals("MSPovertyRefugeStats"))
            {
                this.Stats = MSPovertyRefugeStats.GetInstance();
            }
            else if (stat.Equals("MSPublicAssistanceCenterStats"))
            {
                this.Stats = MSPublicAssistanceCenterStats.GetInstance();
            }
            else if (stat.Equals("MSSuppliesDonationCenterStats"))
            {
                this.Stats = MSSuppliesDonationCenterStats.GetInstance();
            }
            else if (stat.Equals("MSTechnoFarmhouseStats"))
            {
                this.Stats = MSTechnoFarmhouseStats.GetInstance();
            }
            else if (stat.Equals("MSTrashToCashCenterStats"))
            {
                this.Stats = MSTrashToCashCenterStats.GetInstance();
            }
            else if (stat.Equals("MSTutorialCenterStats"))
            {
                this.Stats = MSTutorialCenterStats.GetInstance();
            }
            else if (stat.Equals("MSVaccinationCenterStats"))
            {
                this.Stats = MSVaccinationCenterStats.GetInstance();
            }
            else if (stat.Equals("MSWaterTreatmentPlantStats"))
            {
                this.Stats = MSWaterTreatmentPlantStats.GetInstance();
            }
            else if (stat.Equals("MSWhiteScreensCenterStats"))
            {
                this.Stats = MSWhiteScreensCenterStats.GetInstance();
            }
            else if (stat.Equals("MSWomenCenterStats"))
            {
                this.Stats = MSWomenCenterStats.GetInstance();
            }
            else if (stat.Equals("MSWomenPoliticiansCenterStats"))
            {
                this.Stats = MSWomenPoliticiansCenterStats.GetInstance();
            }
            else if (stat.Equals("MSWomensHealthCenterStats"))
            {
                this.Stats = MSWomensHealthCenterStats.GetInstance();
            }
            else if (stat.Equals("MSWomensUniversityStats"))
            {
                this.Stats = MSWomensUniversityStats.GetInstance();
            }
            else if (stat.Equals("MSWorldWithoutBoundariesStats"))
            {
                this.Stats = MSWorldWithoutBoundariesStats.GetInstance();
            }

            capacity = Int32.Parse(sr.ReadLine());
            System.Console.WriteLine(capacity);
        }
コード例 #3
0
ファイル: MSTowerFactory.cs プロジェクト: verngutz/MoodSwing
        public static MSTower CreateMSTower( MSTowerStats stats, Vector3 position, float rotation, Vector2 tileCoords )
        {
            MoodSwing moodSwing = MoodSwing.GetInstance();
            String model = "";
            String texture = "";
            String effect = "";

            if (stats is MSAntiretroviralCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingGamot";
                effect = "Mood";
            }
            else if (stats is MSApartmentStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingSabaw";
                effect = "Mood";
            }
            else if (stats is MSBedNetsCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingGamot";
                effect = "Mood";
            }
            else if (stats is MSChildrensHospitalStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingTeddy";
                effect = "Mood";
            }
            else if (stats is MSChildrensLibraryStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingLapis";
                effect = "Mood";
            }
            else if (stats is MSEFASchoolStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingLapis";
                effect = "Mood";
            }
            else if (stats is MSEmploymentCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingSabaw";
                effect = "Mood";
            }
            else if (stats is MSEnvironmentalCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/Environment";
                effect = "Mood";
            }
            else if (stats is MSEpidemicsClinicStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingGamot";
                effect = "Mood";
            }
            else if (stats is MSFistulaTreatmentCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingBuntis";
                effect = "Mood";
            }
            else if (stats is MSGeneralClinicStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/Clinic";
                effect = "Mood";
            }
            else if (stats is MSGeneralRefugeStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/Refuge";
                effect = "Mood";
            }
            else if (stats is MSImmunizationOutreachStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingTeddy";
                effect = "Mood";
            }
            else if (stats is MSInternationalCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/Global";
                effect = "Mood";
            }
            else if (stats is MSMaternalCareCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingBuntis";
                effect = "Mood";
            }
            else if (stats is MSPovertyRefugeStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingSabaw";
                effect = "Mood";
            }
            else if (stats is MSPublicAssistanceCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingBigDefault";
                effect = "Mood";
            }
            else if (stats is MSSuppliesDonationCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingLapis";
                effect = "Mood";
            }
            else if (stats is MSTechnoFarmhouseStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingSabaw";
                effect = "Mood";
            }
            else if (stats is MSTrashToCashCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingSabaw";
                effect = "Mood";
            }
            else if (stats is MSTutorialCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingLapis";
                effect = "Mood";
            }
            else if (stats is MSVaccinationCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingTeddy";
                effect = "Mood";
            }
            else if (stats is MSWaterTreatmentPlantStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingDahon";
                effect = "Mood";
            }
            else if (stats is MSWhiteScreensCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingCross";
                effect = "Mood";
            }
            else if (stats is MSWomenCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingCross";
                effect = "Mood";
            }
            else if (stats is MSWomenPoliticiansCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingCross";
                effect = "Mood";
            }
            else if (stats is MSWomensHealthCenterStats)
            {
                model = "MModels/BuildingBig";
                texture = "MTextures/BuildingBuntis";
                effect = "Mood";
            }
            else if (stats is MSWomensUniversityStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingCross";
                effect = "Mood";
            }
            else if (stats is MSWorldWithoutBoundariesStats)
            {
                model = "MModels/BuildingBig";
                texture = "Ulti/BuildingTropa";
                effect = "Mood";
            }

            return new MSTower(model, texture, effect, position, rotation, (int)tileCoords.X, (int)tileCoords.Y, MSMap.tallheight, stats);
        }