public int ReturnPresetCanvasOrder(ICanvasOrderCalculator calculator) { switch (calculator.GetBranchType) { case BranchType.ResolvePopUp: return(_resolvePopUp); case BranchType.OptionalPopUp: return(_optionalPopUp); case BranchType.TimedPopUp: return(_timedPopUp); case BranchType.PauseMenu: return(_pauseMenu); case BranchType.Standard: return(SetStandardCanvasOrder(calculator)); case BranchType.Internal: return(SetStandardCanvasOrder(calculator)); case BranchType.InGameObject: return(_inGameObject); case BranchType.HomeScreen: return(SetStandardCanvasOrder(calculator)); default: return(0); } }
//Main public virtual void OnAwake() { _canvasOrderCalculator = EZInject.Class.WithParams <ICanvasOrderCalculator>(this); _screenData = EZInject.Class.WithParams <IScreenData>(this); _myCanvas.enabled = false; _myCanvasGroup.blocksRaycasts = false; }
public int SetStandardCanvasOrder(ICanvasOrderCalculator calculator) { switch (calculator.GetOrderInCanvas) { case OrderInCanvas.InFront: return(2); case OrderInCanvas.Behind: return(-1); case OrderInCanvas.Manual: return(calculator.GetManualCanvasOrder); case OrderInCanvas.Default: break; } return(0); }