Example #1
0
        public Zombie(LineBatch lineBatch, Level level, Player player, Color color, float speed, bool rightSide)
        {
            this.lineBatch = lineBatch;
            this.level = level;
            this.player = player;
            this.color = color;
            this.speed = speed;
            this.position = Vector2.UnitY * lineBatch.getView().Top + Vector2.UnitX * (rightSide ? -level.offset.X + lineBatch.getView().Right : -level.offset.X);
            this.faceRight = !rightSide;

            this.rightHand = new Vector2(28, -56);

            this.moveValue = 0;
        }
Example #2
0
        public Spider(LineBatch lineBatch, Level level, Player player, Color color, float speed, float scale, bool rightSide)
        {
            this.lineBatch = lineBatch;
            this.level = level;
            this.player = player;
            this.color = color;
            this.speed = speed;
            this.scale = scale;
            this.position = Vector2.UnitY * lineBatch.getView().Top + Vector2.UnitX * (rightSide ? -level.offset.X +  lineBatch.getView().Right : -level.offset.X);

            this.moveValue = 0;
        }