public Enemy(Texture2D Texture, Vector2 position) // Iinputreader => hoe input uitlezen? { Position = position; //read input for hero class EnemyTexture = Texture; animatie = new Animatie(); move = new MoveCommand(); movecommand = new MoveCommand(); animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 2, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 3, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 4, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 5, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 6, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 7, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width / 9 * 8, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(Texture.Width, Texture.Height, Texture.Width / 9, Texture.Height))); // frame lopend collisionrectangle = new Rectangle((int)Position.X, (int)Position.Y, 68, 85); Moving(); }
public Crystal(Texture2D texture, Vector2 pos) { _texture = texture; position = pos; animatie = new Animatie(); animatie.AddFrame(new AnimationFrame(new Rectangle(1, 1, _texture.Width / 6 - 10, _texture.Height))); // 107,160 animatie.AddFrame(new AnimationFrame(new Rectangle(106, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(212, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(318, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(424, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(530, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(636, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(742, 1, _texture.Width / 6 - 10, _texture.Height))); // frame lopend CollisionRectangle = new Rectangle((int)pos.X, (int)pos.Y, texture.Width, texture.Height); }
public Door(Texture2D texture, Vector2 pos) { _texture = texture; position = pos; animatie = new Animatie(); animatie.AddFrame(new AnimationFrame(new Rectangle(1, 1, _texture.Width / 6, _texture.Height))); // 107,160 animatie.AddFrame(new AnimationFrame(new Rectangle(107, 1, _texture.Width / 6, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(217, 1, _texture.Width / 6, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(321, 1, _texture.Width / 6, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(428, 1, _texture.Width / 6, _texture.Height))); // frame lopend animatie.AddFrame(new AnimationFrame(new Rectangle(535, 1, _texture.Width / 6, _texture.Height))); // frame lopend }
public Hero(Texture2D Texture, IInputReader reader) // Iinputreader => hoe input uitlezen? { Position = new Vector2(0, 335); //read input for hero class this.inputreader = reader; HeroTexture = Texture; animatie = new Animatie(); keyb = new KeyBoardReader(); int SchuifX = 0; int SchuifY = 0; for (int i = 0; i < 27; i++) { animatie.AddFrame(new AnimationFrame(new Rectangle(SchuifX, SchuifY, 75, 85))); // frame lopend SchuifX = animatie.BerekenX(); SchuifY = animatie.BerekenY(); } movecommand = new MoveCommand(); collisionrectangle = new Rectangle((int)Position.X, (int)Position.Y, 68, 85); }