protected override void SpawnProjectile() { GameObject projectileGO = Instantiate(projectilePrefab, projectileReleasePoint.position, Quaternion.identity); projectileGO.transform.parent = transform; AOEProjectile projectile = projectileGO.GetComponent <AOEProjectile>(); projectile.SetTargetTile(currentTarget.currentlyOn, multiplier); }
public override void SkillEffect() { if (audioManager) { audioManager.PlaySFX("Launch_Fireball"); } Bounds bound = new Bounds(); AOEProjectile projectile = Instantiate(projectilePrefab, actor.transform.position, projectilePrefab.transform.rotation); projectile.maxSpeed = 1; projectile.acceleration = 1.5f; projectile.BaseValue = _Intensity.Levels[IntensityLevel - 1].IDatas.First(); foreach (var item in enemies) { bound.Encapsulate(item.transform.position); } projectile.destination = bound.center + Vector3.up * 1; projectile.targets = enemies; projectile.OnHit.AddListener(SkillEffectEnd); }