// Update is called once per frame void Update() { if (!first) { child.transform.Rotate(0, 0, 10 * Time.deltaTime); } if (triggeredPlayers >= 2) { if (canTrigger) { if (!first) { AudioManager.instance.PlaySound("S_Checkpoint_Reached"); if (rotatingParticles.startLifetime > 1) { rotatingParticles.startLifetime = 1; rotatingParticles.startSpeed = 3; } } cpm.ActivateCheckpoint(this); // triggeredPlayers = 0; canTrigger = false; platformCheck.CheckpointReached(); } if (!first) { if (rotatingParticles.startLifetime > 0.55f) { rotatingParticles.startLifetime -= 0.005f; } else { Invoke("StopParticles", .8f); } } } }