public Notification CreatePopupText(Vector3 position, Vector3 scale, string text, bool convertLegacyPosition = true) { Vector3 vector = position; if (convertLegacyPosition) { Camera componentInChildren; if (SceneMgr.Get().GetMode() == SceneMgr.Mode.GAMEPLAY) { componentInChildren = BoardCameras.Get().GetComponentInChildren <Camera>(); } else { componentInChildren = Box.Get().GetBoxCamera().GetComponent <Camera>(); } vector = OverlayUI.Get().GetRelativePosition(position, componentInChildren, OverlayUI.Get().m_heightScale.m_Center, 0f); } GameObject go = UnityEngine.Object.Instantiate <GameObject>(this.popupTextPrefab); SceneUtils.SetLayer(go, GameLayer.UI); go.transform.localPosition = vector; go.transform.localScale = scale; OverlayUI.Get().AddGameObject(go, CanvasAnchor.CENTER, false, CanvasScaleMode.HEIGHT); Notification component = go.GetComponent <Notification>(); component.ChangeText(text); component.PlayBirth(); this.popUpTexts.Add(component); return(component); }
public override void PreUnload() { if ((Board.Get() != null) && (BoardCameras.Get() != null)) { LoadingScreen.Get().SetFreezeFrameCamera(Camera.main); LoadingScreen.Get().SetTransitionAudioListener(BoardCameras.Get().GetAudioListener()); } }
private bool CheckCriticalAssetLoads() { if (!this.m_criticalAssetsLoaded) { if (Board.Get() == null) { return(false); } if (BoardCameras.Get() == null) { return(false); } if (BoardStandardGame.Get() == null) { return(false); } if (GameMgr.Get().IsTutorial() && (BoardTutorial.Get() == null)) { return(false); } if (MulliganManager.Get() == null) { return(false); } if (TurnStartManager.Get() == null) { return(false); } if (TargetReticleManager.Get() == null) { return(false); } if (GameplayErrorManager.Get() == null) { return(false); } if (EndTurnButton.Get() == null) { return(false); } if (BigCard.Get() == null) { return(false); } if (CardTypeBanner.Get() == null) { return(false); } if (TurnTimer.Get() == null) { return(false); } if (CardColorSwitcher.Get() == null) { return(false); } if (RemoteActionHandler.Get() == null) { return(false); } if (ChoiceCardMgr.Get() == null) { return(false); } if (InputManager.Get() == null) { return(false); } this.m_criticalAssetsLoaded = true; this.ProcessQueuedPowerHistory(); } return(true); }