Beispiel #1
0
    void InitialStateWins()
    {
        Vector3     missPos   = new Vector3(0, 0, 0.1f);
        _DBC_EFFECT stateName = DBSystem.CDataBaseSystem.Instance.GetDataBase <_DBC_EFFECT>(
            (int)DataBaseStruct.DBC_EFFECT).Search_Index_EQU((int)NpcMissState.AcceptNormal);

        if (stateName != null)
        {
            acceptWin = UnityEngine.Object.Instantiate(UIWindowMng.Instance.GetObjFromCommon(stateName.effectName),
                                                       Vector3.zero, Quaternion.identity) as GameObject;
            acceptWin.name = "UI_Miss_Name_" + stateName.effectName;

            acceptWin.transform.parent        = phyNode.transform;
            acceptWin.transform.localPosition = missPos;
        }
        else
        {
            LogManager.LogError("没有在Effect.txt配置可接任务特效名字");
        }

        stateName = DBSystem.CDataBaseSystem.Instance.GetDataBase <_DBC_EFFECT>(
            (int)DataBaseStruct.DBC_EFFECT).Search_Index_EQU((int)NpcMissState.ContinueNormal);
        if (stateName != null)
        {
            continueWin = UnityEngine.Object.Instantiate(UIWindowMng.Instance.GetObjFromCommon(stateName.effectName),
                                                         Vector3.zero, Quaternion.identity) as GameObject;
            continueWin.name = "UI_Miss_Name_" + stateName.effectName;

            continueWin.transform.parent        = phyNode.transform;
            continueWin.transform.localPosition = missPos;
        }
        else
        {
            LogManager.LogError("没有在Effect.txt配置执行中任务特效名字");
        }

        stateName = DBSystem.CDataBaseSystem.Instance.GetDataBase <_DBC_EFFECT>(
            (int)DataBaseStruct.DBC_EFFECT).Search_Index_EQU((int)NpcMissState.FinishNormal);
        if (stateName != null)
        {
            finishWin = UnityEngine.Object.Instantiate(UIWindowMng.Instance.GetObjFromCommon(stateName.effectName),
                                                       Vector3.zero, Quaternion.identity) as GameObject;
            finishWin.name = "UI_Miss_Name_" + stateName.effectName;

            finishWin.transform.parent        = phyNode.transform;
            finishWin.transform.localPosition = missPos;
        }
        else
        {
            LogManager.LogError("没有在Effect.txt配置可交任务特效名字");
        }

        HideAllState();
    }
Beispiel #2
0
 public CObject_Effect_MouseTarget()
 {
     //读取鼠标点击特效名字
     if (mReachMouseTargetName.Length == 0)
     {
         _DBC_EFFECT pEffect = DBSystem.CDataBaseSystem.Instance.GetDataBase <_DBC_EFFECT>((int)DataBaseStruct.DBC_EFFECT).Search_Index_EQU((int)Effect_MouseTarget_Type.Reachable);
         mReachMouseTargetName = pEffect.effectName;
     }
     if (mUnReachMouseTargetName.Length == 0)
     {
         _DBC_EFFECT pEffect = DBSystem.CDataBaseSystem.Instance.GetDataBase <_DBC_EFFECT>((int)DataBaseStruct.DBC_EFFECT).Search_Index_EQU((int)Effect_MouseTarget_Type.UnReachable);
         mUnReachMouseTargetName = pEffect.effectName;
     }
 }
Beispiel #3
0
        //给该对象增加一个贴花
        public virtual void Attach_ProjTexture(PROJTEX_TYPE type, bool bShow, float Ring_Range, float fHeight, string szTextureName)
        {
            if (mGameObject == null)
            {
                return;
            }
            GFX.GfxEffect effect = null;
            if (!mProjectors.ContainsKey(type))
            {
                if (bShow == false)
                {
                    return;
                }
                _DBC_EFFECT pProjector = DBSystem.CDataBaseSystem.Instance.GetDataBase <_DBC_EFFECT>((int)DataBaseStruct.DBC_EFFECT).Search_Index_EQU((int)type);
                if (pProjector.effectName.Length > 0)
                {
                    effect = (GFX.GfxEffect)GFX.GFXObjectManager.Instance.createObject(pProjector.effectName, GFX.GFXObjectType.EFFECT);
                    mProjectors.Add(type, effect);
                    mObjectOutOfDate          = true;
                    mAttachProjectorOutOfDate = true;
                }
            }
            effect = mProjectors[type];
//             effect.SetVisible(bShow);
            if (bShow)
            {
                effect.setProjectorEffectSize(Ring_Range);                //设置贴花大小
                Vector3 pos = effect.position;
                pos.y           = fHeight;
                effect.position = pos;
            }
            else
            {
                mProjectors.Remove(type);
                GFXObjectManager.Instance.DestroyObject(effect);//删除贴花
            }
        }