protected override void Update() { base.Update(); UpdateMovement(); float dTime = LevelSequencer.instance.timeBPM - beatObjectData.time + _projectileObject.GetDisappearTime(); if (dTime > 0) { _meshRenderer.material.color = dTime > 1 ? Color.white : _savedColor + (Color.white - _savedColor) * dTime * (1 / _projectileObject.GetDisappearTime()); } if (dTime > _duration + _projectileObject.GetDisappearTime() * 3) { Destroy(gameObject); } }