示例#1
0
 private void OnMountMoveEffectAdd(GameObject go, object parameter)
 {
     if (go == null)
     {
         return;
     }
     m_cachedParticleScaler = go.GetComponent <ParticleSystemScaleController>();
     if (m_cachedParticleScaler != null)
     {
         //m_cachedParticleScaler.SetParticleScaler(1);
     }
 }
示例#2
0
    public override void OnMountOff(int mountId)
    {
        base.OnMountOff(mountId);
        ///清除坐骑绑定点下的粒子
        for (int i = 0; i < m_effectBindPointsOnMountList.Count; i++)
        {
            if (m_effectBindPointCache.ContainsKey(m_effectBindPointsOnMountList[i]))
            {
                ClearBindPoint(m_effectBindPointCache[m_effectBindPointsOnMountList[i]]);
            }
        }
        ///清除坐骑相关粒子计数器 和 播放列表
        for (int i = 0; i < m_effectBindToMountList.Count; i++)
        {
            if (m_EffectCountCache.ContainsKey(m_effectBindToMountList[i]))
            {
                m_EffectCountCache.Remove(m_effectBindToMountList[i]);
            }
            if (m_NeedPlayEffectIdCacheList.Contains(m_effectBindToMountList[i]))
            {
                m_NeedPlayEffectIdCacheList.Remove(m_effectBindToMountList[i]);
            }
        }
        m_cachedParticleScaler = null;
        if (GameManager.gameManager.ActiveScene != null)
        {
            GameManager.gameManager.ActiveScene.OnMainPlayerMountOff();
        }
        Tab_MountBase MountBase = TableManager.GetMountBaseByID(mountId, 0);

        if (null == MountBase)
        {
            LogModule.DebugLog("MountBase.txt has not Line ID=" + mountId);
            return;
        }
        Tab_CharMount MountTable = TableManager.GetCharMountByID(MountBase.ModelID, 0);

        if (MountTable == null)
        {
            LogModule.DebugLog("CharMount.txt has not Line ID=" + MountBase.ModelID);
            return;
        }
        PlayEffect(MountTable.EffectMountOff);
        StopEffect(MountTable.MoveEffectId);
    }