Class PlayerSkillProjectileComponent

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.player.PlayerSkillProjectileComponent

public class PlayerSkillProjectileComponent extends Component
  • Constructor Details

    • PlayerSkillProjectileComponent

      public PlayerSkillProjectileComponent()
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      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