void Update() { if (inputManager.IsTriggerClicked() && rayCast.Hit() && canClick) { if (rayCast.GetHit().transform.name == "Save") { if (savingManager.GetCurrentSaveID().Length == 3) { savingManager.UpdateCurrentSave(); } else { //TODO: Display Message } canClick = false; } else if (rayCast.GetHit().transform.name == "SaveAs") { IDSelectorUIHandler idSelectorUIHandler = transform.GetChild(0).Find("IDSelectorUI").GetComponent <IDSelectorUIHandler>(); string saveID = idSelectorUIHandler.GetCurrentID(); Debug.Log(saveID); // TODO: display override message savingManager.SaveGameObjects(saveID); canClick = false; } } if (!canClick) { canClick = !inputManager.IsTriggerClicked(); } }
void Update() { if (inputManager.IsTriggerClicked() && canClick && rayCast.Hit()) { if (rayCast.GetHit().transform.name == "Load") { savingManager.LoadGameObjects(idSelectorUIHandler.GetCurrentID()); // TODO: Use return to display fail or success message canClick = false; } } if (!canClick) { canClick = !inputManager.IsTriggerClicked(); } }