protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); Font = Content.Load <SpriteFont>("Font"); whitepixel = Content.Load <Texture2D>("whitepixel"); gameWorld = new World(graphics, 5); gameWorld.loadTiles(this); jaguarImg = Content.Load <Texture2D>("deer"); hunter = Content.Load <Texture2D>("hunter"); spearImg = Content.Load <Texture2D>("spear"); lionImg = Content.Load <Texture2D>("lion"); deadDeer = Content.Load <Texture2D>("deaddeer"); deadHunterImg = Content.Load <Texture2D>("hunterDead"); deadLionImg = Content.Load <Texture2D>("lionDead"); //timer = new Timer(); playerHunter = new Hunter(hunter, new Vector2(200, 200), oldState); spear = new Spear(spearImg, new Vector2(240, 180), playerHunter, oldState, this); lion = new Lion(lionImg, new Vector2(400, 400), this); deerManager.deadDeer = deadDeer; deerManager.CreateDeer(deerCt, jaguarImg); }
public Spear(Texture2D image, Vector2 position, Hunter hunter, KeyboardState state, Game dasGame) : base(image, position, 1, 3) { collide = new Circle((int)(position.X + 4), (int)(position.Y + 1), 5); this.position = position; prevState = state; this.game = dasGame; }