public override IEnumerator doThing(GameObject target, float delay)
    {
        yield return(new WaitForSeconds(delay));

        SpellSpawn spawnPoint = target.GetComponent <SpellSpawn>();

        if (spawnPoint == null)
        {
            yield break;
        }
        if (overridePrimary != null & overrideSecondary != null)
        {
            spawnPoint.SpawnSpell(overridePrimary, overrideSecondary);
        }
        else if (overridePrimary != null)
        {
            spawnPoint.SpawnSpell(overridePrimary);
        }
        else if (overrideSecondary != null)
        {
            spawnPoint.SpawnSpell(overrideSecondary);
        }
        else
        {
            spawnPoint.SpawnSpell();
        }
    }
Exemple #2
0
 public void SpawnSpell(SpellSpawn spawnPoint)
 {
     spawnPoint.SpawnSpell();
 }