public void Clear() { var ppc = new ParticleParameterCollection(new ParticleSystem()); ppc.Clear(); Assert.AreEqual(0, ppc.Count()); ppc.AddVarying <float>("A"); ppc.AddUniform <float>("B"); ppc.Clear(); Assert.AreEqual(0, ppc.Count()); }
public void Changed() { bool changed = false; var ppc = new ParticleParameterCollection(new ParticleSystem()); ppc.Changed += (s, e) => changed = true; ppc.Clear(); Assert.IsFalse(changed); ppc.AddVarying <float>("D"); Assert.IsTrue(changed); changed = false; ppc.AddUniform <float>("F"); Assert.IsTrue(changed); changed = false; ppc.AddUniform <float>("F"); Assert.IsFalse(changed); changed = false; ppc.AddVarying <float>("F"); Assert.IsTrue(changed); changed = false; ppc.AddUniform <float>("F"); Assert.IsFalse(changed); changed = false; ppc.AddVarying <float>("F"); Assert.IsFalse(changed); changed = false; ppc.Remove("D"); Assert.IsTrue(changed); changed = false; ppc.Clear(); Assert.IsTrue(changed); }
public void Changed() { bool changed = false; var ppc = new ParticleParameterCollection(new ParticleSystem()); ppc.Changed += (s, e) => changed = true; ppc.Clear(); Assert.IsFalse(changed); ppc.AddVarying<float>("D"); Assert.IsTrue(changed); changed = false; ppc.AddUniform<float>("F"); Assert.IsTrue(changed); changed = false; ppc.AddUniform<float>("F"); Assert.IsFalse(changed); changed = false; ppc.AddVarying<float>("F"); Assert.IsTrue(changed); changed = false; ppc.AddUniform<float>("F"); Assert.IsFalse(changed); changed = false; ppc.AddVarying<float>("F"); Assert.IsFalse(changed); changed = false; ppc.Remove("D"); Assert.IsTrue(changed); changed = false; ppc.Clear(); Assert.IsTrue(changed); }
public void Clear() { var ppc = new ParticleParameterCollection(new ParticleSystem()); ppc.Clear(); Assert.AreEqual(0, ppc.Count()); ppc.AddVarying<float>("A"); ppc.AddUniform<float>("B"); ppc.Clear(); Assert.AreEqual(0, ppc.Count()); }