Class CannonBall

    • Constructor Detail

      • CannonBall

        public CannonBall()
    • Method Detail

      • update

        public void update()
        Description copied from class: Entity
        Similar to the Component's update event
        Overrides:
        update in class Entity
      • fire

        public void fire​(com.badlogic.gdx.math.Vector2 pos,
                         com.badlogic.gdx.math.Vector2 dir,
                         Ship sender)
        Teleport the cannonball in from offscreen and set in flying away from the ship.
        Parameters:
        pos - 2D vector location from where it sets off
        dir - 2D vector direction for its movement
        sender - ship entity firing it
      • kill

        public void kill()
        Marks cannonball for removal on next update.
      • getShooter

        public Ship getShooter()