Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public CollisionManager(ICollisionHelper helper)
 {
     this.collisionhelper = helper;
 }
Ejemplo n.º 3
0
 public CollisionManager(IInputReader inputReader, ICollisionHelper helper)
 {
     this.reader          = inputReader;
     this.moveCommand     = new MoveCommand();
     this.collisionhelper = helper;
 }