Esempio n. 1
0
        /// <summary>
        /// Generate and retrieve a random Scene string
        /// </summary>
        private string GenerateRandomSceneString()
        {
            string[] alph    = new string[] { "A", "A", "B", "B", "B", "B", "C" };
            string   rndchar = alph[Globals.rnd.Next(0, alph.Length)];

            return(rndchar + ";" + String.Join("-", MonsterManager.GenerateMonsterList(rndchar)));
        }
Esempio n. 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            MonsterManager.Initialize();
            SpellManager.Initialize();
            AttackManager.Initialize();
            SoundManager.Initialize();
            TextManager.Initialize(360, 413);
            TeamManager.Initialize();

            sceneOne = new BattleScene(1, 50, 130); // y was 139
            sceneOne.Initialize();

            sceneTwo = new BattleScene(2, 665, 130, true);
            sceneTwo.Initialize();

            combatThread = new Thread(CombatLoop);

            base.Initialize();
        }
Esempio n. 3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Graphics
            gameBackground = Content.Load <Texture2D>("Graphics\\GameArea");
            font           = Content.Load <SpriteFont>("Graphics\\Font");

            // Managers
            MonsterManager.LoadContent();
            SpellManager.LoadContent();
            SoundManager.LoadContent(Content);
            TextManager.LoadContent(Content, font);
            TeamManager.LoadContent();
            StatusSpriteManager.LoadContent(Content);
            MagicSpriteManager.LoadContent(Content);

            // Populate the scenes with random monsters
            PopulateScenes();

            // Threading
            combatThread.Start();
        }
Esempio n. 4
0
 public static MonoMonster GetMonoMonsterByName(string name)
 {
     return((MonoMonster)MonsterManager.GetMonsterByName(name));
 }