コード例 #1
0
    void Shoot()
    {
        GameObject          projectileGO = Instantiate(projectilePrefab, firePoint.position, firePoint.rotation);
        ProjectileBehaviour projectile   = projectileGO.GetComponent <ProjectileBehaviour>();

        if (projectile != null)
        {
            projectile.Seek(target);
        }
        //play.Play2DSFX(17); SI LO PONES PETA
    }