public void ShowScreenForeground(ShowScreenForegroundEvent e, ForegroundNode foreground) { foreground.screenForeground.Count++; ScreenForegroundAnimationComponent screenForegroundAnimation = foreground.screenForegroundAnimation; screenForegroundAnimation.Animator.SetBool("visible", true); screenForegroundAnimation.Alpha = e.Alpha; }
public void HideScreenForeground(HideScreenForegroundEvent e, ForegroundNode foreground) { if (foreground.screenForeground.Count > 0) { foreground.screenForeground.Count--; } if (foreground.screenForeground.Count == 0) { HideForeground(foreground); } }
public void ForceHideScreenForeground(ForceHideScreenForegroundEvent e, ForegroundNode foreground) { foreground.screenForeground.Count = 0; HideForeground(foreground); }
public void SendShowScreenEvent(NodeAddedEvent e, SingleNode <ShowScreenForegroundComponent> screen, [JoinAll] ForegroundNode foreground) { ShowScreenForegroundEvent eventInstance = new ShowScreenForegroundEvent { Alpha = screen.component.Alpha }; base.ScheduleEvent(eventInstance, foreground); }
public void SendHideScreenEvent(NodeRemoveEvent e, SingleNode <ShowScreenForegroundComponent> screen, [JoinAll] ForegroundNode foreground) { base.ScheduleEvent <HideScreenForegroundEvent>(foreground); }
private static void HideForeground(ForegroundNode foreground) { foreground.screenForegroundAnimation.Animator.SetBool("visible", false); }