void CheckCollactable(RaycastHit hit) { if (hit.collider.CompareTag("Collectable")) { if (toCollect == null) { toCollect = hit.collider.GetComponent <ICollectable>(); toCollect.Highlight(); } else { ICollectable newCollect = hit.collider.GetComponent <ICollectable>(); if (newCollect != toCollect) { toCollect.Unhighlight(); toCollect = newCollect; toCollect.Highlight(); } } } else { if (toCollect != null) { var toFuckingDelete = toCollect; toCollect = null; toFuckingDelete.Unhighlight(); } toCollect = null; } }