Example #1
0
        public Hero(Texture2D texture, IInputReader reader)
        {
            heroTexture      = texture;
            walkRight        = new WalkRightAnimation(texture, this);
            walkLeft         = new WalkLeftAnimation(texture, this);
            currentAnimation = walkRight;
            //animatie = new Animatie();
            //animatie.AddFrame(new AnimationFrame(new Rectangle(0, 0, 280, 385)));
            //animatie.AddFrame(new AnimationFrame(new Rectangle(280, 0, 280, 385)));
            //animatie.AddFrame(new AnimationFrame(new Rectangle(560, 0, 280, 385)));
            //animatie.AddFrame(new AnimationFrame(new Rectangle(840, 0, 280, 385)));
            //animatie.AddFrame(new AnimationFrame(new Rectangle(1120, 0, 280, 385)));


            //Read input for my hero class
            this.inputReader = reader;
            mouseReader      = new MouseReader();

            moveCommand   = new MoveCommand();
            moveToCommand = new MoveToCommando();

            Position = new Vector2(0, 0);

            _collisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, 280, 385);
        }
Example #2
0
 public void HeroWalkAnimation(IEntityAnimation walkRight, IEntityAnimation walkLeft, IEntityAnimation walkUp, IEntityAnimation walkDown)
 {
     this.walkRight   = walkRight;
     this.walkLeft    = walkLeft;
     this.walkUp      = walkUp;
     this.walkDown    = walkDown;
     currentAnimation = walkDown;
 }
        public Blob(Texture2D texture, IInputReader reader, CollisionManager collisionManager)
        {
            blobTexture      = texture;
            blobBlue         = new BlopAnimation(texture, this); // Needs change Still-----------------------------
            currentAnimation = blobBlue;

            //Read Input
            this.inputReader = reader;

            moveCommand = new MoveCommand();

            Position = new Vector2(0, 200);

            _collisionRectangle = new Rectangle((int)Position.X + 32, (int)Position.Y + 32, 32, 32);
        }
Example #4
0
 public Speler(Texture2D texture, List <Rectangle> blokken, ContentManager content)
 {
     // basis pos //
     positie = new Vector2(70, 1595);
     walk    = new WalkAnimation(texture, this);
     // Read input for my hero class
     _collisionRectangle = new Rectangle((int)positie.X, (int)positie.Y, 66, 86);
     colli  = new Collisionn(this, blokken);
     kogels = new List <Kogel>()
     {
         new ShootCommand()
         {
             Bullet = new Bullet(),
         },
     };
     InitializeContent(content);
 }
Example #5
0
        public Hero(Texture2D texture, IInputReader inputReader, ICollisionHelper helper)
        {
            this.heroTexture = texture;
            walkRight        = new WalkRightAnimation(texture, this);
            walkLeft         = new WalkLeftAnimation(texture, this);
            walkUp           = new WalkUpAnimation(texture, this);
            walkDown         = new WalkDownAnimation(texture, this);
            currentAnimation = walkDown;

            //Read input for hero class
            this.reader = inputReader;
            moveCommand = new MoveCommand();


            _collisionRectangle  = new Rectangle((int)Position.X, (int)Position.Y, 62, 110);
            this.collisionhelper = helper;
            Position             = new Vector2(65, 340);

            //manager = new CollisionManager(inputReader, helper);
        }