public void Update() { if (randomSpeed <= 0) { isMoveDone = true; } position += direction * Time.deltaTime * randomSpeed; rotation += randomRotateSpeed; randomSpeed -= Time.deltaTime * 3; meshParticle.UpdateQuad(index, meshParticle.quadSize, position, rotation); }
public void Update() { intervalTime += Time.deltaTime; if (intervalTime <= .1f) { return; } intervalTime -= .1f; uvIndex++; position += direction * Time.deltaTime * randomSpeed; randomSpeed -= Time.deltaTime * 3; if (randomSpeed <= 0 || UvIndex >= 6 || !isRunning) { uvIndex = 6; isMoveDone = true; } meshParticle.UpdateQuad(quadIndex, meshParticle.quadSize, position, 0, UvIndex); }