virtual protected bool PlayUIAni(UIAniType _type) { if (mAniMap == null) { return(false); } if (!mAniMap.ContainsKey(_type)) { return(false); } if (!mAniMap[_type].CanPlay) { return(false); } if (mCurAni != null && mCurAni.Type == _type && mCurAni.IsPlaying) { return(true); } if (mCurAni != null) { mCurAni.Stop(); } mCurAni = mAniMap[_type]; return(mCurAni.Play()); }
private Image[] m_BG;//背景桌面 #region #endregion #region 麻将中以加载预制体形式展示特效 //public void PlayUIAnimation(int seatIndex, UIAnimationType type) //{ // m_Seats[seatIndex].PlayUIAnimation(type); //} public void PlayUIAnimation(UIAniType type) { string path = string.Format("download/{0}/prefab/uiprefab/uianimations/{1}.drb", ConstDefine.GAME_NAME, type.ToString().ToLower()); AssetBundleManager.Instance.LoadOrDownload(path, type.ToString().ToLower(), (GameObject go) => { go = Instantiate(go); go.SetParent(m_EffectContainer); }); }