private void OnBGClick(GameObject go) { if (!this.canClose) { return; } if (this.BGClickCallBack != null) { this.BGClickCallBack(); } UnityEngine.Object.DestroyImmediate(base.gameObject); GetPetLayer.mInstance = null; Globals.Instance.TutorialMgr.InitializationCompleted(this, null); }
public static GetPetLayer Show(PetDataEx petData, GetPetLayer.VoidCallback cb, GetPetLayer.EGPL_ShowNewsType type = GetPetLayer.EGPL_ShowNewsType.Null) { if (petData == null) { global::Debug.LogError(new object[] { "PetDataEx is null" }); return null; } if (GetPetLayer.mInstance == null) { GetPetLayer.CreateInstance(); GetPetLayer.mInstance.Init(petData.Info, cb, type); } return GetPetLayer.mInstance; }
private static void CreateInstance() { GameUIManager.mInstance.DestroyPetInfoSceneV2(); GameObject prefab = Res.LoadGUI("GUI/GetPetLayer"); GameObject gameObject = NGUITools.AddChild(GameUIManager.mInstance.uiCamera.gameObject, prefab); Vector3 localPosition = gameObject.transform.localPosition; localPosition.z = 2000f; gameObject.transform.localPosition = localPosition; GetPetLayer.mInstance = gameObject.GetComponent<GetPetLayer>(); }
public void Init(PetInfo info, GetPetLayer.VoidCallback cb, GetPetLayer.EGPL_ShowNewsType type = GetPetLayer.EGPL_ShowNewsType.Null) { if (info == null) { global::Debug.LogError(new object[] { "PetInfo is null" }); return; } this.mPetInfo = info; this.BGClickCallBack = (GetPetLayer.VoidCallback)Delegate.Combine(this.BGClickCallBack, cb); this.mShowNewsType = type; if (this.mPetInfo.Quality >= 2) { base.StartCoroutine(this.PlayAnim()); } else { base.StartCoroutine(this.PlayRollOneAnim()); } }
public static bool TryDestroy() { if (GetPetLayer.mInstance != null) { if (GetPetLayer.mInstance.BGClickCallBack != null) { GetPetLayer.mInstance.BGClickCallBack(); } UnityEngine.Object.Destroy(GetPetLayer.mInstance.gameObject); GetPetLayer.mInstance = null; return true; } return false; }
public static GetPetLayer Show(PetInfo info, GetPetLayer.VoidCallback cb, GetPetLayer.EGPL_ShowNewsType type = GetPetLayer.EGPL_ShowNewsType.Null) { if (GetPetLayer.mInstance == null) { GetPetLayer.CreateInstance(); GetPetLayer.mInstance.Init(info, cb, type); } return GetPetLayer.mInstance; }
public void FeatureCardClick() { this.getPetLayer = null; }