re-enabled scene change and disabled debug logs

This commit is contained in:
maverickdgg 2023-02-23 13:42:22 +08:00
parent 64be53bad3
commit 69f2e678df
2 changed files with 6 additions and 6 deletions

View File

@ -11,14 +11,14 @@ public class ChangeSceneButton : Script
UIElement ui = GetComponent<UIElement>(); UIElement ui = GetComponent<UIElement>();
if (ui != null) if (ui != null)
{ {
ui.OnHoverEnter.RegisterAction(() => ui.OnRelease.RegisterAction(() =>
{ {
Debug.Log("C# Hover Enter");
if (sceneID != 0) if (sceneID != 0)
{ {
//Audio.PlaySFXOnce2D("event:/UI/success"); Audio.PlaySFXOnce2D("event:/UI/success");
//SceneManager.ChangeScene(sceneID); SceneManager.ChangeScene(sceneID);
//Audio.StopAllSounds(); Audio.StopAllSounds();
} }
}); });
} }

View File

@ -204,7 +204,7 @@ namespace SHADE
SHButtonClickEvent clickEvent; SHButtonClickEvent clickEvent;
clickEvent.EID = comp.GetEID(); clickEvent.EID = comp.GetEID();
SHEventManager::BroadcastEvent(clickEvent, SH_BUTTON_HOVER_ENTER_EVENT); SHEventManager::BroadcastEvent(clickEvent, SH_BUTTON_HOVER_ENTER_EVENT);
SHLOG_INFO("C++ BROADCASTED HOVER ENTER EVENT EID: {}", clickEvent.EID); //SHLOG_INFO("C++ BROADCASTED HOVER ENTER EVENT EID: {}", clickEvent.EID);
} }
comp.isHovered = true; comp.isHovered = true;