void Launch() { GameObject projectileObject = Instantiate(ProjectilePrefab, rigidbody2d.position + Vector2.up * 0.5f, Quaternion.identity); scr_Projectile projectile = projectileObject.GetComponent <scr_Projectile>(); projectile.Launch(lookDirection, force); canShoot = 0; animator.SetTrigger("Launch"); Debug.Log("bullets on hand: " + canShoot); }