Esempio n. 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);
        }
    }
    void ShootProjectile(Vector3 position, float angle)
    {
        BadGuyProjectile bgp = GameObject.Instantiate(prefab_projectile, position, Quaternion.identity);

        bgp.Launch(BadGuy.DirectionUpCircleShellPlayer(transform.position, 0.5f, angle), 10);
    }
Esempio n. 3
0
    public static void LaunchProjectile(BadGuyProjectile prefab, Vector3 launchPosition)
    {
        BadGuyProjectile bgp = GameObject.Instantiate(prefab, launchPosition, Quaternion.identity);

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