示例#1
0
    void Launch()
    {
        GameObject projectile = Instantiate(projectilePrefab, rigidbody2d.position + Vector2.up * 0.2f, Quaternion.identity);

        BoomerangProjectileController boomerangProjectile = projectile.GetComponent <BoomerangProjectileController>();

        boomerangProjectile.Launch(lookDirection, projectileSpeed);
    }
示例#2
0
 void LaunchBoomerang()
 {
     if (inventory.hasRang && inventory.secActive == Inventory.Secondary.RANG)
     {
         GameObject boomerang = Instantiate(boomerangPrefab, rigidbody2d.position + Vector2.up * .2f, Quaternion.identity);
         BoomerangProjectileController boomerangProjectile = boomerang.GetComponent <BoomerangProjectileController>();
         boomerangProjectile.Launch(lookDirection, projectileSpeed);
         PlaySound(arrowBoom);
     }
 }
    void Launch()
    {
        launched = true;
        animator.SetFloat("Look X", 0);
        animator.SetFloat("Look Y", 1);
        GameObject projectile = Instantiate(projectilePrefab, rigidbody2d.position + Vector2.up * 0.2f, Quaternion.identity);

        BoomerangProjectileController boomerangProjectile = projectile.GetComponent <BoomerangProjectileController>();

        boomerangProjectile.Launch(lookDirection, projectileSpeed);
    }