Class EnemyProjectileComponent

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.npc.EnemyProjectileComponent

public class EnemyProjectileComponent extends Component
  • Constructor Details

    • EnemyProjectileComponent

      public EnemyProjectileComponent()
  • Method Details

    • create

      public void create()
      Create enemy projectile component
      Overrides:
      create in class Component
    • update

      public void update()
      Sets the projectile to move in a certain direction at a certain speed and updates the projectile to keep moving at that speed.
      Overrides:
      update in class Component
    • setProjectileDirection

      public void setProjectileDirection(com.badlogic.gdx.math.Vector2 projectileDirection)
      Sets the projectile's direction
      Parameters:
      projectileDirection - the vector direction of the projectile's movement
    • removeProjectile

      public void removeProjectile(com.badlogic.gdx.physics.box2d.Fixture me, com.badlogic.gdx.physics.box2d.Fixture other)
      Remove projectile from map