Interface ProjectileSource

    • Method Detail

      • launchProjectile

        @NotNull
        <T extends Projectile> T launchProjectile​(@NotNull
                                                  Class<? extends T> projectile)
        Launches a Projectile from the ProjectileSource.
        Type Parameters:
        T - a projectile subclass
        Parameters:
        projectile - class of the projectile to launch
        Returns:
        the launched projectile
      • launchProjectile

        @NotNull
        <T extends Projectile> T launchProjectile​(@NotNull
                                                  Class<? extends T> projectile,
                                                  @Nullable
                                                  Vector velocity)
        Launches a Projectile from the ProjectileSource with an initial velocity.
        Type Parameters:
        T - a projectile subclass
        Parameters:
        projectile - class of the projectile to launch
        velocity - the velocity with which to launch
        Returns:
        the launched projectile