public Zombie(Vector2 position, GraphicsLib graphicsLib) { this.position = position; speed = 0.9f; health = 3; damage = 5; destinationRect = new Rectangle((int)position.X, (int)position.Y, 30, 30); this.graphicsLib = graphicsLib; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); graphicsLib = new GraphicsLib(Content); // ladataan grafiikkakirjasto soundsLib = new SoundsLib(Content); menuControl = new MenuControl(spriteBatch, soundsLib.menuSound, graphicsLib); popup = new Popup(spriteBatch, graphicsLib.text, graphicsLib.popup); highScores = HighScores.Load("Content/hiscores.xml"); highScores.Sort(); }
public Player(Vector2 position, GraphicsLib graphicsLib, int health) { this.position = position; bSphere = new BoundingSphere(new Vector3(position.X, position.Y, 0), 12); this.graphicsLib = graphicsLib; this.health = health; defaultWeapon = "Assault Rifle"; currentWeapon = defaultWeapon; shotInterval = 170f; damage = 1; }
public MenuControl(SpriteBatch spriteBatch, SoundEffect sEffect, GraphicsLib graphicsLib) { this.graphicsLib = graphicsLib; Color baseColor = Color.Brown; Color selectedColor = Color.Red; this.spriteBatch = spriteBatch; this.font = graphicsLib.text; menuSound = sEffect; menu[0] = new Menu("Play", "Play", font, new Vector2(50f, 100f), baseColor, selectedColor, true); menu[1] = new Menu("HighScores", "High Scores", font, new Vector2(50f, 150f), baseColor, selectedColor, false); menu[2] = new Menu("Help", "Help", font, new Vector2(50f, 200f), baseColor, selectedColor, false); menu[3] = new Menu("Quit", "Quit", font, new Vector2(50f, 250f), baseColor, selectedColor, false); }
public Rifle(Vector2 position, GraphicsLib graphicsLib) { this.position = position; this.graphicsLib = graphicsLib; itemName = "Rifle"; }
public Bullet(Vector2 position, Vector2 direction, GraphicsLib graphicsLib) { this.graphicsLib = graphicsLib; this.position = position; this.direction = direction; }
public Machinegun(Vector2 position, GraphicsLib graphicsLib) { this.position = position; this.graphicsLib = graphicsLib; itemName = "Machinegun"; }
public MedKit(Vector2 position, GraphicsLib graphicsLib) { this.position = position; this.graphicsLib = graphicsLib; itemName = "MedKit"; }