示例#1
0
    IEnumerator LoopSequence(ProjectileSequence projectileSequence, ProjectileManager projectileManager)
    {
        yield return(new WaitForSeconds(projectileSequence.beginOffset));

        foreach (SequenceElement element in projectileSequence.sequence)
        {
            projectileManager.SpawnProjectile(element.projectileSpawner);
            yield return(new WaitForSeconds(element.timeAfter));
        }

        isSequencing = false;
    }
示例#2
0
 public void StartSequence(ProjectileSequence projectileSequence, ProjectileManager projectileManager)
 {
     isSequencing = true;
     StartCoroutine(LoopSequence(projectileSequence, projectileManager));
 }