private void SpawnProjectileForTargetPoint(AbilityData data, Vector3 spawnPosition) { Projectile projectile = Instantiate(projectileToSpawn); projectile.transform.position = spawnPosition; projectile.SetTarget(data.GetTargetedPoint(), data.GetUser(), damage); }
private IEnumerator Effect(AbilityData data, Action finished) { Transform instance = Instantiate(prefabToSpawn); instance.position = data.GetTargetedPoint(); if (destroyDelay > 0) { yield return(new WaitForSeconds(destroyDelay)); Destroy(instance.gameObject); } finished(); }
public override void StartEffect(AbilityData data, Action finished) { data.GetUser().transform.LookAt(data.GetTargetedPoint()); finished(); }