private void Start() { particleSystemMidController = particle.GetComponent <ParticleSystemMidController>(); particles = (ParticleSystemController[])FindObjectsOfType(typeof(ParticleSystemController)); buttonUpdate.onClick = new Button.ButtonClickedEvent(); buttonUpdate.onClick.AddListener(() => clickUpdate()); }
public IEnumerator particleSystemRateOverTime1000Test() { int rate = 1000; GameObject newGameObject = InstantiateGameObjectParticleSystemMidController(); yield return(null); particleSystemMidController = newGameObject.GetComponent <ParticleSystemMidController>(); particleSystemMidController.setEmissionRateOverTime(rate); Assert.AreEqual(rate, particleSystemMidController.particleSystem.emission.rateOverTime.constantMax); }
public IEnumerator particleSystemEdgeTest() { GameObject newGameObject = InstantiateGameObjectParticleSystemMidController(); yield return(null); particleSystemMidController = newGameObject.GetComponent <ParticleSystemMidController>(); particleSystemMidController.shapeEdge(); var shape = particleSystemMidController.particleSystem.shape; Assert.AreEqual(ParticleSystemShapeType.SingleSidedEdge, shape.shapeType); Assert.AreEqual(ParticleSystemMidController.ANGLE, shape.angle); Assert.AreEqual(ParticleSystemMidController.EDGE_RADIUS, shape.radius); }