public void Cast(EnemyController caster, Vector3 hotspot, Vector3 target, int layer) { MagicProjectile projectile = Instantiate(ProjectilePrefab, hotspot, Quaternion.identity); projectile.Launch(caster, target, ProjectileSpeed, Range); Helpers.RecursiveLayerChange(projectile.gameObject.transform, layer); projectile.ProjectileCollided += OnProjectileCollided; }
void LaunchMagicProjectile() { MagicProjectile projectile = grimiore.magicEffect.GetComponent <MagicProjectile>(); projectileInstance = projectile.Launch( grimiore, projectileLaunchPoint.transform.position, projectileTarget.transform ); }