示例#1
0
 public static void Reset()
 {
     LuaAnimClipModel.Reset();
     LuaEffectConfModel.Reset();
     ResetDrawHitData();
     if (m_model != null)
     {
         Object.DestroyImmediate(m_model);
         m_model = null;
     }
     if (m_rightWeapon != null)
     {
         Object.DestroyImmediate(m_rightWeapon);
         m_rightWeapon = null;
     }
     if (m_leftWeapon != null)
     {
         Object.DestroyImmediate(m_leftWeapon);
         m_leftWeapon = null;
     }
     m_modelAnimation       = null;
     m_rightWeaponAnimation = null;
     m_leftWeaponAnimation  = null;
     m_dicIDEffectObject.Clear();
     m_dicIDEffects.Clear();
     m_dicIDObjectNameDelay.Clear();
     m_dicIDEffectAnimation.Clear();
 }
示例#2
0
 private static void InitLuaConfigData()
 {
     LuaReader.Read <AnimClipData.AnimClipData>();
     LuaReader.Read <EffectConf.EffectData>(true);
     LuaAnimClipModel.SetCurrentModelName(m_model.name);
     LuaEffectConfModel.Init();
     LuaAnimClipModel.SetEffectChangeCallback(SetEffectData);
 }
示例#3
0
        private static void CreateEffect(AnimClipData.EffectData animClipEffect)
        {
            EffectConf.EffectData data = LuaEffectConfModel.GetEffectData(animClipEffect.id);
            string     path            = Tool.GetAssetProjectPath(data.resourceName, Config.PrefabExtension, Config.SkillEffectPath);
            GameObject effectNode      = LoadPrefab(Tool.ProjectPathToFullPath(path));

            SetEffectTransform(data, effectNode);
            SetEffectParticle(animClipEffect.id, effectNode);
            m_dicIDEffectObject.Add(animClipEffect.id, effectNode);
        }
示例#4
0
 public static void ReloadEffectConf()
 {
     LuaEffectConfModel.Reset();
     LuaReader.Read <EffectConf.EffectData>(true);
     LuaEffectConfModel.Init();
     foreach (var idObjectPair in m_dicIDEffectObject)
     {
         uint                  id         = idObjectPair.Key;
         GameObject            effectNode = idObjectPair.Value;
         EffectConf.EffectData data       = LuaEffectConfModel.GetEffectData(id);
         if (data.IsNullTable())
         {
             continue;
         }
         SetEffectTransform(data, effectNode);
     }
 }
示例#5
0
        private bool EffectDataUI(int frameIndex, object @object)
        {
            EffectData data = (EffectData)@object;

            SpaceWithLabel(LabelEffectType);
            data.type = (EffectType)EnumPopup(data.type);
            SpaceWithLabel(LabelEffectID);
            data.id = TextField(data.id);
            Lua.EffectConf.EffectData transformData = LuaEffectConfModel.GetEffectData(data.id);
            if (data.type == EffectType.Hit)
            {
                EffectRotationData rotationData = data.rotation;
                SpaceWithLabel(LabelX);
                rotationData.x = TextField(rotationData.x);
                SpaceWithLabel(LabelY);
                rotationData.y = TextField(rotationData.y);
                SpaceWithLabel(LabelZ);
                rotationData.z = TextField(rotationData.z);
                data.rotation  = rotationData;
            }
            else if (!transformData.IsNullTable())
            {
                if (!transformData.offset.IsNullTable())
                {
                    EffectTransformDataUI(transformData.offset);
                }
                if (!transformData.scale.IsNullTable())
                {
                    EffectTransformDataUI(transformData.scale);
                }
                if (!transformData.rotation.IsNullTable())
                {
                    EffectTransformDataUI(transformData.rotation);
                }
            }
            Controller.SetCustomeSubData(frameIndex, data, FrameType.PlayEffect);
            bool isDelete = SpaceWithButton(BtnDelete);

            if (isDelete)
            {
                Controller.DeleteCustomData(frameIndex, (int)data.index - 1, FrameType.PlayEffect);
            }
            Space();
            return(isDelete);
        }