public void showExplosionChain(SChainExplosionParameters cParams, Vector3 position, Vector3 velocity, float simInterval = float.NaN) { var ci = new ExplosionChainInfo(this, cParams, position, velocity); _explosionChains.Add(ci); }
public ExplosionChainInfo(SExplosionManager em, SChainExplosionParameters cep, Vector3 position, Vector3 velocity) { _em = em; _chainParams = cep; _position = position; _velocity = velocity; _explosionsRemaining = rand.Next(cep.numExplosionMin, cep.numExplosionsMax + 1); _delaysRemaining = new float[cep.maxNumConcurrent]; _delaysRemaining[0] = cep.initDelay; // have one explosion kick in right away with no delay for (int i = 1; i < cep.maxNumConcurrent; ++i) { _delaysRemaining[i] = cep.initDelay + cep.minDelay + (float)rand.NextDouble() * (cep.maxDelay - cep.minDelay); } }