Why are we overriding OnDrawerUnLocked when the overridded code can also be entered directly under OnDrawerUnlocked function? Both functions are being executed anyway so why separate them?
private void OnDrawerUnlocked(SelectEnterEventArgs arg0)
{
isLocked = false;
if(keyIndicatorLight != null)
{
keyIndicatorLight.SetActive(false);
}
Debug.Log("****DRAWER UNLOCKED");
}
protected override void OnSelectEntered(SelectEnterEventArgs args)
{
base.OnSelectEntered(args);
if (!isLocked)
{
transform.SetParent(parentTransform);
isGrabbed = true;
}
else
{
ChangeLayerMask(defaultLayer);
}
}