public static void LaunchProjectile2D(BadGuyProjectile prefab, Vector3 launchPosition, bool heightBased = false) { BadGuyProjectile bgp = GameObject.Instantiate(prefab, launchPosition, Quaternion.identity); if (!heightBased) { bgp.Launch(BadGuy.DirectionToPlayer2D(launchPosition), 10); } else { bgp.Launch(BadGuy.DirectionToPlayer(launchPosition), 10); } }
public static void LaunchProjectile2D(BadGuyProjectile prefab, Vector3 launchPosition) { BadGuyProjectile bgp = GameObject.Instantiate(prefab, launchPosition, Quaternion.identity); bgp.Launch(BadGuy.DirectionToPlayer2D(launchPosition), 10); }