public Player(Game1 game, AnimatedTexture playerAnimation) { position.X = 5 * Constants.tileSizeX; position.Y = 5 * Constants.tileSizeY; shootCounter = shootSpeed; // Start with full shoot counter so that we can shoot immediately direction = new Vector2(0, -1); animation = playerAnimation; }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); projectileTexture = Content.Load <Texture2D>("Sprites/syringe"); playerAnimation = new AnimatedTexture(Vector2.Zero, 0, 1, 0f); // Origin: new Vector2(31, 40) playerAnimation.Load(Content, "Sprites/character", 12, 5); npcTexture = Content.Load <Texture2D>("Sprites/talking"); plantTexture = Content.Load <Texture2D>("Sprites/plant"); font = Content.Load <SpriteFont>("SpriteFont1"); receptionFloorTexture = Content.Load <Texture2D>("Sprites/reception_floor"); wardFloorTexture = Content.Load <Texture2D>("Sprites/ward_floor"); electroFloorTexture = Content.Load <Texture2D>("Sprites/floor clean"); cabinetLowerTexture = Content.Load <Texture2D>("Sprites/cabinet lower"); electroMachineTexture = Content.Load <Texture2D>("Sprites/electro machine clean"); deadScreenTexture = Content.Load <Texture2D>("Sprites/deadScreen"); enemyLeftTexture = Content.Load <Texture2D>("Sprites/enemyleft"); enemyBackTexture = Content.Load <Texture2D>("Sprites/enemyback"); cleanbed90Texture = Content.Load <Texture2D>("Sprites/cleanbed90"); deskTexture = Content.Load <Texture2D>("Sprites/desk"); benchTexture = Content.Load <Texture2D>("Sprites/bench"); enemyTexture = Content.Load <Texture2D>("Sprites/enemy"); receptionistTexture = Content.Load <Texture2D>("Sprites/receptionist"); normalperson1Texture = Content.Load <Texture2D>("Sprites/normalperson1"); normalperson2Texture = Content.Load <Texture2D>("Sprites/normalperson2"); winScreenTexture = Content.Load <Texture2D>("Sprites/SuccessScreen"); flashTexture = Content.Load <Texture2D>("Sprites/blackscreen"); doorTexture = Content.Load <Texture2D>("Sprites/Door"); doorRightTexture = Content.Load <Texture2D>("Sprites/Door_Right"); cleanBedTexture = Content.Load <Texture2D>("Sprites/Clean bed"); bloodyBedTexture = Content.Load <Texture2D>("Sprites/bloody bed"); bloodyBedBitsTexture = Content.Load <Texture2D>("Sprites/beds"); cabinetTexture = Content.Load <Texture2D>("Sprites/Cabinet-Side"); electroMachineDirtyTexture = Content.Load <Texture2D>("Sprites/bloodyelectromachine"); deskDirtyTexture = Content.Load <Texture2D>("Sprites/dirty desk"); benchDirtyTexture = Content.Load <Texture2D>("Sprites/Dirtybench"); plantDirtyTexture = Content.Load <Texture2D>("Sprites/dead plant"); receptionFloorDirtyTexture = Content.Load <Texture2D>("Sprites/reception_floor_dirty"); nurseForwardTexture = Content.Load <Texture2D>("Sprites/nurseforward"); nurseLeftTexture = Content.Load <Texture2D>("Sprites/nurseleft"); player = new Player(this, playerAnimation); loadLevel(0); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); projectileTexture = Content.Load<Texture2D>("Sprites/syringe"); playerAnimation = new AnimatedTexture(Vector2.Zero, 0, 1, 0f); // Origin: new Vector2(31, 40) playerAnimation.Load(Content, "Sprites/character", 12, 5); npcTexture = Content.Load<Texture2D>("Sprites/talking"); plantTexture = Content.Load<Texture2D>("Sprites/plant"); font = Content.Load<SpriteFont>("SpriteFont1"); receptionFloorTexture = Content.Load<Texture2D>("Sprites/reception_floor"); wardFloorTexture = Content.Load<Texture2D>("Sprites/ward_floor"); electroFloorTexture = Content.Load<Texture2D>("Sprites/floor clean"); cabinetLowerTexture = Content.Load<Texture2D>("Sprites/cabinet lower"); electroMachineTexture = Content.Load<Texture2D>("Sprites/electro machine clean"); deadScreenTexture = Content.Load<Texture2D>("Sprites/deadScreen"); enemyLeftTexture = Content.Load<Texture2D>("Sprites/enemyleft"); enemyBackTexture = Content.Load<Texture2D>("Sprites/enemyback"); cleanbed90Texture = Content.Load<Texture2D>("Sprites/cleanbed90"); deskTexture = Content.Load<Texture2D>("Sprites/desk"); benchTexture = Content.Load<Texture2D>("Sprites/bench"); enemyTexture = Content.Load<Texture2D>("Sprites/enemy"); receptionistTexture = Content.Load<Texture2D>("Sprites/receptionist"); normalperson1Texture = Content.Load<Texture2D>("Sprites/normalperson1"); normalperson2Texture = Content.Load<Texture2D>("Sprites/normalperson2"); winScreenTexture = Content.Load<Texture2D>("Sprites/SuccessScreen"); flashTexture = Content.Load<Texture2D>("Sprites/blackscreen"); doorTexture = Content.Load<Texture2D>("Sprites/Door"); doorRightTexture = Content.Load<Texture2D>("Sprites/Door_Right"); cleanBedTexture = Content.Load<Texture2D>("Sprites/Clean bed"); bloodyBedTexture = Content.Load<Texture2D>("Sprites/bloody bed"); bloodyBedBitsTexture = Content.Load<Texture2D>("Sprites/beds"); cabinetTexture = Content.Load<Texture2D>("Sprites/Cabinet-Side"); electroMachineDirtyTexture = Content.Load<Texture2D>("Sprites/bloodyelectromachine"); deskDirtyTexture = Content.Load<Texture2D>("Sprites/dirty desk"); benchDirtyTexture = Content.Load<Texture2D>("Sprites/Dirtybench"); plantDirtyTexture = Content.Load<Texture2D>("Sprites/dead plant"); receptionFloorDirtyTexture = Content.Load<Texture2D>("Sprites/reception_floor_dirty"); nurseForwardTexture = Content.Load<Texture2D>("Sprites/nurseforward"); nurseLeftTexture = Content.Load<Texture2D>("Sprites/nurseleft"); player = new Player(this, playerAnimation); loadLevel(0); }