Create an Effect Controller
Post date:
2017-07-14 17:46
Project:
![el_bearduno's picture el_bearduno's picture](https://tinyphoenixgames.com/sites/default/files/styles/thumbnail/public/pictures/picture-20-1458768722.png?itok=9T-hGJdD)
Labels:
Status:
Priority:
Putting this on hold because most of this can be done in a particle system already.
Effect Controller
public struct EffectStruct {
Effect effect;
int weight;
}
EffectStruct[] effects;
int minEffectCount;
int maxEffectCount;
float minDelayBetweenEffects;
float maxDelayBetweenEffects;
Vector3 minLocalPosition;
Vector3 maxLocalPosition;
Vector3 minLocalScale;
Vector3 maxLocalScale;
Vector3 minLocalRotation;
Vector3 maxLocalRotation;
bool playInOrder = false;
void PlayAllEffect()
{
//choose how many effect to play
// for each effect
{
//get delay
//choose effect
StartCoroutine(PlaySingleEffect(effect, delay));
}
}
IEnumerator PlaySingleEffect(Effect effect, float delay)
{
yield return new WaitForSeconds(delay);
effect.Play();
}
Add new comment