public Explosion(long _uniqueId, Vector3 _position, Quaternion _rotation) : base(_uniqueId, _position, _rotation, "Models/explosion") { Scale = 1; Active = true; explosion = ContentLoadManager.loadModel("Models/explosion"); Random random = new Random((int)(_position.X + _position.Y + _position.Z)); float x = random.Next() * spinRate; if (random.Next() % 2 == 0) { x *= -1; } else { } float y = random.Next() * spinRate; if (random.Next() % 2 == 0) { y *= -1; } else { } float z = random.Next() * spinRate; if (random.Next() % 2 == 0) { z *= -1; } else { } spinDirection = new Vector3(x, y, z); x = random.Next() * outerspinRate; if (random.Next() % 2 == 0) { x *= -1; } else { } y = random.Next() * outerspinRate; if (random.Next() % 2 == 0) { y *= -1; } else { } z = random.Next() * outerspinRate; if (random.Next() % 2 == 0) { z *= -1; } else { } outerSpinDirection = new Vector3(x, y, z); float r = (float)random.NextDouble() * MAX_SCALE_RESCALE; if (random.Next() % 2 == 0) { x *= -1; } else { } MAX_SCALE += r; r = (float)random.NextDouble() * SCALE_RATE_RESCALE; if (random.Next() % 2 == 0) { x *= -1; } else { } SCALE_RATE += r; generator = new ExplosionParticleGenerator(_position); }
public ExplosionParticle(Vector3 _position, ExplosionParticleGenerator _home) : base("Textures/Screens/grubby_paw_logo", _position) { home = _home; ttl = TTL; Random random = new Random((int)(_position.X + _position.Y + _position.Z)); Scale = 100.0f; }