Exemplo n.º 1
0
        private void SpawnProjectileForTargetPoint(AbilityData data, Vector3 spawnPosition)
        {
            Projectile projectile = Instantiate(projectileToSpawn);

            projectile.transform.position = spawnPosition;
            projectile.SetTarget(data.GetTargetedPoint(), data.GetUser(), damage);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
 public override void StartEffect(AbilityData data, Action finished)
 {
     data.GetUser().transform.LookAt(data.GetTargetedPoint());
     finished();
 }