this.rotation = atan2(player.y - this.y, player.x - this.y); this.speed = 2.5; this.x += cos(this.rotation) * this.speed; this.y += sin(this.rotation) * this.speed;