Ejemplo n.º 1
0
        public void Draw(GraphicsManager graphics)
        {
            if (m_EditorEnabled)
            {
                Primitive2D.Instance.Thickness = 2.0f;
                for (int i = EntityManager.Instance.DrawableGameObjects.Count - 1; i >= 0; i--)
                {
                    if (m_HoveringOnIndex == i)
                    {
                        Primitive2D.Instance.Color = Color.Red;
                    }
                    else
                    {
                        Primitive2D.Instance.Color = Color.LimeGreen;
                    }
                    Primitive2D.Instance.CreateSquare(EntityManager.Instance.DrawableGameObjects[i].Sprite.BoundingRectangle);
                    Primitive2D.Instance.RenderSquarePrimitive(graphics.SpriteBatch, Vector2.Zero);
                }

                if (InputManager.Instance.Keyboard.CheckKeyDown(Keys.LeftControl))
                {
                    if (CloneableDrawableEntities.Count > 0)
                    {
                        CloneableDrawableEntities[m_CloneIndex].Draw(graphics);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void Initialize(GraphicsManager graphics)
        {
            if (Sprite.Texture == null)
            {
                Sprite.Texture = ContentLoader.Instance.Load<Texture2D>(ContentContainer.Game, @"Content\\Zombie");
                base.Sprite.Rotation = MathHelper.Pi * 1.5f;
                base.Sprite.CenterImage();
            }

            m_MyLogic = new EntityAI(base.Sprite.Position, 200.0f, 3.0f);

            m_PossiblePosition = base.Sprite.Position;
            m_PreviousPosition = new Vector2();
            m_StartMoving = true;

            base.Initialize(graphics);

            m_AudioWalk = new AudioEffect();

            m_AudioWalk.LoadAudioEffect(@"Content\\Sounds\\zombie2", ContentContainer.Game);
            m_AudioWalk.Volume = 0.3f;
            m_AudioWalk.Pan = -1.0f;

            m_StopWatch = new GameStopWatch();
            GameTimeSpan timeSpan = new GameTimeSpan();
            timeSpan.Seconds = 2f;
            m_StopWatch.SetTimeInterval(timeSpan);

            m_CurrentHealth = 100;
            m_MaxHealth = 100;
        }
Ejemplo n.º 3
0
 public override void Draw(GraphicsManager graphics)
 {
     base.Sprite.Draw(graphics.SpriteBatch);
     m_HudSprites.Draw(graphics.SpriteBatch);
     m_HudText.Draw(graphics.SpriteBatch, m_CandyCorn.ToString(), new Vector2(50.0f, 130.0f));
     m_HudText.Draw(graphics.SpriteBatch, m_CurrentHealth.ToString() + " / " + m_MaxHealth.ToString(), new Vector2(50.0f, 65.0f));
     m_PistolSmoke.Draw(graphics.SpriteBatch);
     //m_ShotgunSmoke.Draw(graphics.SpriteBatch);
 }
Ejemplo n.º 4
0
 public void Draw(GraphicsManager graphicsPacket)
 {
     for (int i = DrawableGameObjects.Count - 1; i >= 0; i--)
     {
         if (DrawableGameObjects[i].Display)
         {
             DrawableGameObjects[i].Draw(graphicsPacket);
         }
     }
 }
Ejemplo n.º 5
0
        public override void Draw(GraphicsManager graphics)
        {
            m_Background.Draw(graphics.SpriteBatch);
            m_Moon.Draw(graphics.SpriteBatch);
            m_Pumpkin.Draw(graphics.SpriteBatch);
            m_Grave.Draw(graphics.SpriteBatch);
            m_Title.Draw(graphics.SpriteBatch);

            m_NewGame.Draw(graphics);
            m_Continue.Draw(graphics);
            m_Back.Draw(graphics);
        }
Ejemplo n.º 6
0
 public void Draw(GraphicsManager graphics)
 {
     switch (m_GameState)
     {
         case GameState.InFullScreenMenu:
             MenuManager.Instance.Draw(graphics);
             break;
         case GameState.PlayingGame:
             EntityManager.Instance.Draw(graphics);
             break;
     }
 }
Ejemplo n.º 7
0
        public void LoadEntities(GraphicsManager graphicsPacket)
        {
            for (int i = 0; i < GameObjects.Count; i++)
            {
                GameObjects[i].Initialize(graphicsPacket);
            }

            for (int i = 0; i < DrawableGameObjects.Count; i++)
            {
                DrawableGameObjects[i].Initialize(graphicsPacket);
            }
        }
Ejemplo n.º 8
0
        public override void Draw(GraphicsManager graphics)
        {
            m_Background.Draw(graphics.SpriteBatch);
            m_Moon.Draw(graphics.SpriteBatch);
            m_Pumpkin.Draw(graphics.SpriteBatch);
            m_Grave.Draw(graphics.SpriteBatch);
            m_Title.Draw(graphics.SpriteBatch);

            m_PlayImage.Draw(graphics);
            m_OptionsImage.Draw(graphics);
            m_CreditsImage.Draw(graphics);
            m_ExitImage.Draw(graphics);
        }
Ejemplo n.º 9
0
        public override void Draw(GraphicsManager graphics)
        {
            m_Background.Draw(graphics.SpriteBatch);
            m_Moon.Draw(graphics.SpriteBatch);
            m_Pumpkin.Draw(graphics.SpriteBatch);
            m_Grave.Draw(graphics.SpriteBatch);
            m_Title.Draw(graphics.SpriteBatch);
            m_Resolution.Draw(graphics.SpriteBatch);
            m_fullScreen.Draw(graphics.SpriteBatch);
            m_checkMark.Draw(graphics.SpriteBatch);

            m_lArrow.Draw(graphics);
            m_rArrow.Draw(graphics);
            m_checkBox.Draw(graphics);
            m_Back.Draw(graphics);
        }
Ejemplo n.º 10
0
 public override void Initialize(GraphicsManager graphics)
 {
     base.Sprite.Texture = ContentLoader.Instance.Load<Texture2D>(ContentContainer.Game, @"Content\\House");
     base.Initialize(graphics);
 }
Ejemplo n.º 11
0
 public override void Draw(GraphicsManager graphics)
 {
     base.Sprite.Draw(graphics.SpriteBatch);
 }
Ejemplo n.º 12
0
 public override void Draw(GraphicsManager graphics)
 {
 }
Ejemplo n.º 13
0
        public void Initialize(GraphicsManager graphics, Assembly gameAssembly)
        {
            for (int i = 0; i < CloneableDrawableEntities.Count; i++)
            {
                CloneableDrawableEntities[i].Initialize(graphics);
            }

            for (int i = 0; i < CloneableEntities.Count; i++)
            {
                CloneableEntities[i].Initialize(graphics);
            }
            m_GameAssembly = gameAssembly;
        }