void AcquireComponents() { if (!reflection) { if (transform.parent) { reflection = transform.parent.GetComponent <PlanarReflectionSM>(); } else { reflection = transform.GetComponent <PlanarReflectionSM>(); } } if (!waterBase) { if (transform.parent) { waterBase = transform.parent.GetComponent <WaterBaseSM>(); } else { waterBase = transform.GetComponent <WaterBaseSM>(); } } }