public void Appear(enFormHideFlag hideFlag = enFormHideFlag.HideByCustom, bool dispatchVisibleChangedEvent = true) { if (this.m_alwaysKeepVisible) { return; } this.m_hideFlags &= (int)(~(int)hideFlag); if (this.m_hideFlags != 0 || !this.m_isHided) { return; } this.m_isHided = false; if (this.m_canvas != null) { this.m_canvas.enabled = true; this.m_canvas.sortingOrder = this.m_sortingOrder; } if (this.m_graphicRaycaster && !this.m_disableInput) { this.m_graphicRaycaster.enabled = true; } for (int i = 0; i < this.m_relatedScenes.get_Count(); i++) { CUIUtility.SetGameObjectLayer(this.m_relatedScenes.get_Item(i), 18); this.SetSceneCameraEnable(i, true); } this.AppearComponent(); this.DispatchRevertVisibleFormEvent(); if (dispatchVisibleChangedEvent) { this.DispatchVisibleChangedEvent(); } }
public void Hide(enFormHideFlag hideFlag = 1, bool dispatchVisibleChangedEvent = true) { if (!this.m_alwaysKeepVisible) { this.m_hideFlags |= hideFlag; if ((this.m_hideFlags != 0) && !this.m_isHided) { this.m_isHided = true; if (this.m_canvas != null) { this.m_canvas.enabled = false; } if (this.m_graphicRaycaster != null) { this.m_graphicRaycaster.enabled = false; } for (int i = 0; i < this.m_relatedScenes.Count; i++) { CUIUtility.SetGameObjectLayer(this.m_relatedScenes[i], 0x1f); this.SetSceneCameraEnable(i, false); } this.HideComponent(); if (this.m_revertToHideEvent != enUIEventID.None) { Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(this.m_revertToHideEvent); } if (dispatchVisibleChangedEvent) { this.DispatchVisibleChangedEvent(); } } } }
public void Hide(enFormHideFlag hideFlag = enFormHideFlag.HideByCustom, bool dispatchVisibleChangedEvent = true) { if (this.m_alwaysKeepVisible) { return; } this.m_hideFlags |= (int)hideFlag; if (this.m_hideFlags == 0 || this.m_isHided) { return; } this.m_isHided = true; if (this.m_canvas != null) { this.m_canvas.enabled = false; } if (this.m_graphicRaycaster) { this.m_graphicRaycaster.enabled = false; } for (int i = 0; i < this.m_relatedScenes.get_Count(); i++) { CUIUtility.SetGameObjectLayer(this.m_relatedScenes.get_Item(i), 31); this.SetSceneCameraEnable(i, false); } this.HideComponent(); if (this.m_revertToHideEvent != enUIEventID.None) { Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(this.m_revertToHideEvent); } if (dispatchVisibleChangedEvent) { this.DispatchVisibleChangedEvent(); } }
public void Appear(enFormHideFlag hideFlag = 1, bool dispatchVisibleChangedEvent = true) { if (!this.m_alwaysKeepVisible) { this.m_hideFlags &= ~hideFlag; if ((this.m_hideFlags == 0) && this.m_isHided) { this.m_isHided = false; if (this.m_canvas != null) { this.m_canvas.enabled = true; this.m_canvas.sortingOrder = this.m_sortingOrder; } if ((this.m_graphicRaycaster != null) && !this.m_disableInput) { this.m_graphicRaycaster.enabled = true; } for (int i = 0; i < this.m_relatedScenes.Count; i++) { CUIUtility.SetGameObjectLayer(this.m_relatedScenes[i], 0x12); this.SetSceneCameraEnable(i, true); } this.AppearComponent(); this.DispatchRevertVisibleFormEvent(); if (dispatchVisibleChangedEvent) { this.DispatchVisibleChangedEvent(); } } } }
public static void SetGameObjectLayer(GameObject gameObject, int layer) { gameObject.layer = layer; for (int i = 0; i < gameObject.transform.childCount; i++) { CUIUtility.SetGameObjectLayer(gameObject.transform.GetChild(i).gameObject, layer); } }
public override void Hide() { base.Hide(); this.m_renderCamera.enabled = false; for (int i = 0; i < this.m_3DGameObjects.Count; i++) { st3DGameObject obj2 = this.m_3DGameObjects[i]; CUIUtility.SetGameObjectLayer(obj2.m_gameObject, 0x1f); } }
public override void Appear() { base.Appear(); this.m_renderCamera.enabled = true; for (int i = 0; i < this.m_3DGameObjects.Count; i++) { st3DGameObject obj2 = this.m_3DGameObjects[i]; CUIUtility.SetGameObjectLayer(obj2.m_gameObject, s_cameraLayers[(int)this.m_imageLayer]); } }
public override void Hide() { base.Hide(); if (this.m_renderCamera != null) { this.m_renderCamera.enabled = false; } for (int i = 0; i < this.m_3DGameObjects.get_Count(); i++) { CUIUtility.SetGameObjectLayer(this.m_3DGameObjects.get_Item(i).m_gameObject, 31); } }
public override void Appear() { base.Appear(); if (this.m_renderCamera != null) { this.m_renderCamera.enabled = true; } for (int i = 0; i < this.m_3DGameObjects.get_Count(); i++) { CUIUtility.SetGameObjectLayer(this.m_3DGameObjects.get_Item(i).m_gameObject, CUI3DImageScript.s_cameraLayers[(int)this.m_imageLayer]); } }
public void Appear() { this.m_isHided = false; if (this.m_canvas != null) { this.m_canvas.enabled = true; this.m_canvas.sortingOrder = this.m_sortingOrder; } if ((this.m_graphicRaycaster != null) && !this.m_disableInput) { this.m_graphicRaycaster.enabled = true; } for (int i = 0; i < this.m_relatedScenes.Count; i++) { CUIUtility.SetGameObjectLayer(this.m_relatedScenes[i], 0x12); this.SetSceneCameraEnable(i, true); } this.AppearComponent(); }
private void Initialize3DGameObjects() { for (int i = 0; i < base.gameObject.transform.childCount; i++) { GameObject gameObject = base.gameObject.transform.GetChild(i).gameObject; CUIUtility.SetGameObjectLayer(gameObject, s_cameraLayers[(int)this.m_imageLayer]); if (this.m_renderCamera.orthographic) { this.ChangeScreenPositionToWorld(gameObject, ref this.m_pivotScreenPosition); } st3DGameObject item = new st3DGameObject { m_path = gameObject.name, m_gameObject = gameObject, m_useGameObjectPool = false, m_protogenic = true, m_bindPivot = true }; this.m_3DGameObjects.Add(item); } this.m_renderCamera.enabled = this.m_3DGameObjects.Count > 0; }
private void Initialize3DGameObjects() { this.m_3DGameObjects.Clear(); for (int i = 0; i < base.gameObject.transform.childCount; i++) { GameObject gameObject = base.gameObject.transform.GetChild(i).gameObject; CUIUtility.SetGameObjectLayer(gameObject, CUI3DImageScript.s_cameraLayers[(int)this.m_imageLayer]); if (this.m_renderCamera.orthographic) { this.ChangeScreenPositionToWorld(gameObject, ref this.m_pivotScreenPosition); } CUI3DImageScript.C3DGameObject c3DGameObject = new CUI3DImageScript.C3DGameObject(); c3DGameObject.m_path = gameObject.name; c3DGameObject.m_gameObject = gameObject; c3DGameObject.m_useGameObjectPool = false; c3DGameObject.m_protogenic = true; c3DGameObject.m_bindPivot = true; this.m_3DGameObjects.Add(c3DGameObject); } this.m_renderCamera.enabled = (this.m_3DGameObjects.get_Count() > 0); }
public void Hide(bool dispatchHideEvent = true) { this.m_isHided = true; if (this.m_canvas != null) { this.m_canvas.enabled = false; } if (this.m_graphicRaycaster != null) { this.m_graphicRaycaster.enabled = false; } for (int i = 0; i < this.m_relatedScenes.Count; i++) { CUIUtility.SetGameObjectLayer(this.m_relatedScenes[i], 0x1f); this.SetSceneCameraEnable(i, false); } this.HideComponent(); if (dispatchHideEvent) { this.DispatchHideFormEvent(); } }
public override void Hide() { base.Hide(); CUIUtility.SetGameObjectLayer(this.m_rawRootObject, 0x1f); }
public override void Appear() { base.Appear(); CUIUtility.SetGameObjectLayer(this.m_rawRootObject, 15); }
public override void Appear() { base.Appear(); CUIUtility.SetGameObjectLayer(base.gameObject, 5); }
public override void Hide() { base.Hide(); CUIUtility.SetGameObjectLayer(base.gameObject, 31); }
public GameObject AddGameObject(string path, bool useGameObjectPool, ref Vector2 screenPosition, bool bindPivot, bool needCached = false, string pathToAdd = null) { GameObject gameObject = null; if (useGameObjectPool) { gameObject = Singleton <CGameObjectPool> .GetInstance().GetGameObject(path, 5); } else { GameObject gameObject2 = (GameObject)Singleton <CResourceManager> .GetInstance().GetResource(path, typeof(GameObject), 5, needCached, false).m_content; if (gameObject2 != null) { gameObject = (GameObject)Object.Instantiate(gameObject2); } } if (gameObject == null) { return(null); } Vector3 localScale = gameObject.transform.localScale; if (pathToAdd == null) { gameObject.transform.SetParent(base.gameObject.transform, true); } else { Transform transform = base.gameObject.transform.Find(pathToAdd); if (transform) { gameObject.transform.SetParent(transform, true); } } gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; CUI3DImageScript.C3DGameObject c3DGameObject = new CUI3DImageScript.C3DGameObject(); c3DGameObject.m_gameObject = gameObject; c3DGameObject.m_path = path; c3DGameObject.m_useGameObjectPool = useGameObjectPool; c3DGameObject.m_protogenic = false; c3DGameObject.m_bindPivot = bindPivot; this.m_3DGameObjects.Add(c3DGameObject); if (this.m_renderCamera.orthographic) { this.ChangeScreenPositionToWorld(gameObject, ref screenPosition); if (!this.m_renderCamera.enabled && this.m_3DGameObjects.get_Count() > 0) { this.m_renderCamera.enabled = true; } } else { Transform transform2 = base.transform.FindChild("_root"); if (transform2 != null) { if (pathToAdd == null) { gameObject.transform.SetParent(transform2, true); } else { Transform transform3 = base.gameObject.transform.Find(pathToAdd); if (transform3) { gameObject.transform.SetParent(transform3, true); } } gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; gameObject.transform.localScale = localScale; } } CUIUtility.SetGameObjectLayer(gameObject, (!this.m_renderCamera.enabled) ? 31 : CUI3DImageScript.s_cameraLayers[(int)this.m_imageLayer]); return(gameObject); }
public GameObject AddGameObject(string path, bool useGameObjectPool, ref Vector2 screenPosition, bool bindPivot, bool needCached = false, string pathToAdd = null) { GameObject gameObject = null; if (useGameObjectPool) { gameObject = Singleton <CGameObjectPool> .GetInstance().GetGameObject(path, enResourceType.UI3DImage); } else { GameObject content = (GameObject)Singleton <CResourceManager> .GetInstance().GetResource(path, typeof(GameObject), enResourceType.UI3DImage, needCached, false).m_content; if (content != null) { gameObject = (GameObject)UnityEngine.Object.Instantiate(content); } } if (gameObject == null) { return(null); } Vector3 localScale = gameObject.transform.localScale; if (pathToAdd == null) { gameObject.transform.SetParent(base.gameObject.transform, true); } else { Transform parent = base.gameObject.transform.Find(pathToAdd); if (parent != null) { gameObject.transform.SetParent(parent, true); } } gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; st3DGameObject item = new st3DGameObject { m_gameObject = gameObject, m_path = path, m_useGameObjectPool = useGameObjectPool, m_protogenic = false, m_bindPivot = bindPivot }; this.m_3DGameObjects.Add(item); if (this.m_renderCamera.orthographic) { this.ChangeScreenPositionToWorld(gameObject, ref screenPosition); if (!this.m_renderCamera.enabled && (this.m_3DGameObjects.Count > 0)) { this.m_renderCamera.enabled = true; } } else { Transform transform2 = base.transform.FindChild("_root"); if (transform2 != null) { if (pathToAdd == null) { gameObject.transform.SetParent(transform2, true); } else { Transform transform3 = base.gameObject.transform.Find(pathToAdd); if (transform3 != null) { gameObject.transform.SetParent(transform3, true); } } gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; gameObject.transform.localScale = localScale; } } CUIUtility.SetGameObjectLayer(gameObject, !this.m_renderCamera.enabled ? 0x1f : s_cameraLayers[(int)this.m_imageLayer]); return(gameObject); }