// Update is called once per frame public void Update() { if (active) { //reach the target if ((Time.time - startTime) > limitTime) { delete(); } pMaker.setParticlePosition(particleIndex, getPosition(fromPoint, toPoint, (Time.time - startTime) / limitTime)); } }
// Update is called once per frame void Update() { for (int i = 0; i < _pSender.Length; ++i) { if (_pSender[i].active) { _pSender[i].Update(); pMaker.setParticlePosition(i, _pSender[i].position); } else { pMaker.disappear(i); } } }