public Enemy(ContentManager content, Vector2 position, Stage stage, string enemytype) { Name = enemytype; Active = true; _health = 1; CollisionIsHazardous = true; VulnerableToBullets = true; direction = Player.PlayerDirection.Left; EnemyMoveSpeed = 0.0f; WorldPosition = position; CurrentStage = stage; }
protected void ChangeDirection() { Velocity.X = -Velocity.X; if (Math.Abs((int)Velocity.X) > 0) { if (this.direction == Player.PlayerDirection.Right) { this.direction = Player.PlayerDirection.Left; } else { this.direction = Player.PlayerDirection.Right; } } }