示例#1
0
        public override bool AddTempStatus(TempStatus tempStatus)
        {
            bool ret = base.AddTempStatus(tempStatus);

            // If the status is not an instant kill, add the status sprite
            if (ret)
            {
                if (tempStatus != TempStatus.Mini)
                {
                    StatusSprite statSpr = StatusSpriteManager.GetStatusSprite();
                    SetStatusSprite(statSpr, tempStat: tempStatus);
                }
            }
            return(ret);
        }
示例#2
0
        public override bool AddPermStatus(PermStatus permStatus)
        {
            bool ret = base.AddPermStatus(permStatus);

            if (ret)
            {
                // If the status is not an instant kill, add the status sprite
                PermStatus[] killStatuses = new PermStatus[] { PermStatus.KO, PermStatus.Stone, PermStatus.Toad };
                if (!killStatuses.Contains(permStatus))
                {
                    StatusSprite statSpr = StatusSpriteManager.GetStatusSprite();
                    SetStatusSprite(statSpr, permStat: permStatus);
                }
            }


            return(ret);
        }
示例#3
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();
            spriteBatch.Draw(gameBackground, new Vector2(), Color.White);
            spriteBatch.Draw(bg1, new Vector2(), Color.White);
            spriteBatch.Draw(bg2, new Vector2(512, 0), Color.White);
            sceneOne.Draw(spriteBatch);
            sceneTwo.Draw(spriteBatch);

            TextManager.Draw(spriteBatch);
            StatusSpriteManager.Draw(spriteBatch);
            MagicSpriteManager.Draw(spriteBatch);

            spriteBatch.End();

            base.Draw(gameTime);
        }
示例#4
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            sceneOne.UpdateSceneText();
            sceneTwo.UpdateSceneText();
            sceneOne.Update(gameTime);
            sceneTwo.Update(gameTime);

            // Update Managers
            StatusSpriteManager.Update(gameTime);
            MagicSpriteManager.Update(gameTime);
            TeamManager.Update(gameTime);

            base.Update(gameTime);
        }
示例#5
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();
        }