Skip to content

Commit

Permalink
Fixed ClassScheduleMenu action point being visible in h scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Feb 28, 2021
1 parent b44214c commit b9a5e65
Showing 1 changed file with 15 additions and 7 deletions.
Expand Up @@ -89,16 +89,24 @@ private static void SpawnCrestActionPoint()

var player = Singleton<Game>.Instance.actScene.Player;
evt.UpdateAsObservable()
.Where(_ => playerInRange && ActionInput.isAction && !player.isActionNow && !Singleton<Scene>.Instance.IsNowLoadingFade)
.Subscribe(_ =>
{
Singleton<Scene>.Instance.LoadReserve(new Scene.Data
// Hide in H scenes and other places
var isVisible = Singleton<Game>.IsInstance() && !Singleton<Game>.Instance.IsRegulate(true);
if (rendererIcon.enabled != isVisible)
rendererIcon.enabled = isVisible;
// Check if player clicked this point
if (isVisible && playerInRange && ActionInput.isAction && !player.isActionNow && !Singleton<Scene>.Instance.IsNowLoadingFade)
{
assetBundleName = "action/menu/classschedulemenu.unity3d",
levelName = "ClassScheduleMenu",
isAdd = true,
isAsync = true
}, false);
Singleton<Scene>.Instance.LoadReserve(new Scene.Data
{
assetBundleName = "action/menu/classschedulemenu.unity3d",
levelName = "ClassScheduleMenu",
isAdd = true,
isAsync = true
}, false);
}
})
.AddTo(evt);
}
Expand Down

0 comments on commit b9a5e65

Please sign in to comment.