Beispiel #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            TextureManager.LoadContent(Content);
            ItemCreator.LoadItemData();
            SoundManager.LoadSounds(Content);
            SoundManager.PlayMusic();
            SoundManager.PlayPauseMusic();
            AchievementManager.CreateAchievements();
            Player.Init();
            MainMenuManager.Init();
            OptionsMenu.Init();
            CityManager.Initialize();
            TravelMenu.Init();
            WorldEventManager.Init();
            EventLog.Init();
            WorldMapMenu.LoadCities();
            EncounterManager.Initialize();
            CityInfoMenu.Init();
            CharCreationMenu.Init();
            SkillManager.Init();

            ModifierManager.LoadCityAndCategoryLists();
            ModifierManager.LoadItemModifiers();
            Calendar.PrepareCalendar();

            cityMenu = new CityMenu();
            playerInventoryModule = new PlayerInventoryModule();

            previousGameState2 = GameState.Debug;
            previousGameState  = GameState.Debug;
            gameState          = GameState.MainMenu;

            options   = false;
            activeInv = new Inventory(100);
            random    = new Random();

            CityControlList = new List <string>();
            CityControlList.Add("Carrot Town");
            CityControlList.Add("Cloudspire");
        }
Beispiel #2
0
 static private void ApplyItemModifier(WorldEvent newWorldEvent)
 {
     foreach (ItemModifierTemplate newMod in itemModifierList)
     {
         if (newMod.ID == newWorldEvent.EffectVal[0])
         {
             foreach (string cityTarget in newWorldEvent.Target)
             {
                 foreach (City tempCity in WorldMapMenu.Cities)
                 {
                     if (cityTarget == tempCity.Name)
                     {
                         for (int i = 0; i < newMod.ItemCategories.Count; i++)
                         {
                             ModifierManager.AddModifier(cityTarget, newMod.ItemCategories[i], newMod.ItemModifiers[i]);
                         }
                     }
                 }
             }
         }
     }
 }
Beispiel #3
0
 static private void UnApplyItemModifier(WorldEvent worldEvent)
 {
     foreach (ItemModifierTemplate newMod in itemModifierList)
     {
         if (newMod.ID == worldEvent.EffectVal[0])
         {
             foreach (string cityTarget in worldEvent.Target)
             {
                 foreach (City tempCity in WorldMapMenu.Cities)
                 {
                     if (cityTarget == tempCity.Name)
                     {
                         for (int i = 0; i < newMod.ItemCategories.Count; i++)
                         {
                             float tempMod = -(newMod.ItemModifiers[i] * 2);
                             ModifierManager.SetModifier(cityTarget, newMod.ItemCategories[i], tempMod);
                         }
                     }
                 }
             }
         }
     }
 }