protected IEnumerator MoveCrew(Vector3 from, Vector3 to) { var effects = Game.Instance.effects; yield return(CoroutineComposer.MakeParallel( this, CoroutineComposer.MakeDelayed(0, effects.Create <EffectSpark>("Spark").Setup(from, to, 1).Run()), CoroutineComposer.MakeDelayed(0.25f, effects.Create <EffectSpark>("Spark").Setup(from, to, 1).Run()), CoroutineComposer.MakeDelayed(0.5f, effects.Create <EffectSpark>("Spark").Setup(from, to, 1).Run()) )); }
protected override IEnumerator TickUntilDone() { List <IEnumerator> sparks = new List <IEnumerator>(); for (int i = 0; i < sparkCount; ++i) { sparks.Add(DelayedSpark(Random.value)); } sparks.Add(CoroutineComposer.MakeDelayed(.2f, CoroutineComposer.MakeAction(() => Game.Instance.audioManager.Play("repair")))); sparks.Add(CoroutineComposer.MakeDelayed(.6f, CoroutineComposer.MakeAction(() => Game.Instance.audioManager.Play("repair")))); yield return(CoroutineComposer.MakeParallel(this, sparks.ToArray())); }
private void OnDeactivateEvade() { owner.EnqueueAnimation(CoroutineComposer.MakeDelayed(.25f, CoroutineComposer.MakeAction(() => visuals.TrailVisible = false))); }
private void OnActivateEvade() { Debug.LogFormat("Evading"); owner.EnqueueAnimation(CoroutineComposer.MakeDelayed(.25f, CoroutineComposer.MakeAction(() => visuals.TrailVisible = true))); FinishTurn(); }