Пример #1
0
    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);
        }
    }
Пример #2
0
    public static void LaunchProjectile(BadGuyProjectile prefab, Vector3 launchPosition)
    {
        BadGuyProjectile bgp = GameObject.Instantiate(prefab, launchPosition, Quaternion.identity);

        bgp.Launch(BadGuy.DirectionToPlayer(launchPosition), 10);
    }