Exemple #1
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);
        }
Exemple #2
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);
     }
 }
Exemple #3
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);
        }