static public VFXExpression BuildRandom(VFXSeedMode seedMode, bool constant, RandId randId, VFXExpression seed = null) { if (seedMode == VFXSeedMode.PerParticleStrip || constant) { if (seed == null) { throw new ArgumentNullException("seed"); } return(FixedRandom(seed, seedMode)); } return(new VFXExpressionRandom(seedMode == VFXSeedMode.PerParticle, randId)); }
static VFXExpression RandomFromVector2(VFXExpression input, RandId randId) { return(VFXOperatorUtility.Lerp(input.x, input.y, new VFXExpressionRandom(false, randId))); }
public VFXExpressionRandom(bool perElement, RandId id) : base(perElement ? VFXExpression.Flags.PerElement : VFXExpression.Flags.None) { m_Id = id; }