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); } } } }
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; }
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); }
public void Draw(GraphicsManager graphicsPacket) { for (int i = DrawableGameObjects.Count - 1; i >= 0; i--) { if (DrawableGameObjects[i].Display) { DrawableGameObjects[i].Draw(graphicsPacket); } } }
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); }
public void Draw(GraphicsManager graphics) { switch (m_GameState) { case GameState.InFullScreenMenu: MenuManager.Instance.Draw(graphics); break; case GameState.PlayingGame: EntityManager.Instance.Draw(graphics); break; } }
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); } }
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); }
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); }
public override void Initialize(GraphicsManager graphics) { base.Sprite.Texture = ContentLoader.Instance.Load<Texture2D>(ContentContainer.Game, @"Content\\House"); base.Initialize(graphics); }
public override void Draw(GraphicsManager graphics) { base.Sprite.Draw(graphics.SpriteBatch); }
public override void Draw(GraphicsManager graphics) { }
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; }