//绘制特效的配置 public static void DrawEffectConfigure(EffectConfigure effect) { EditorGUILayout.BeginVertical("Box"); EditorGUILayout.LabelField(" 特效配置:"); effect.posType = (CySkillEditor.EffectConfigure.PosType)EditorGUILayout.Popup(" posType", (int)effect.posType, Enum.GetNames(typeof(CySkillEditor.EffectConfigure.PosType))); effect.effectName = EditorGUILayout.TextField(" effectName", effect.effectName); if (effect.posType == CySkillEditor.EffectConfigure.PosType.BODY) { effect.bodyHeight = EditorGUILayout.FloatField(" bodyHeight", effect.bodyHeight); } else if (effect.posType == CySkillEditor.EffectConfigure.PosType.HEAD) { effect.headHeight = EditorGUILayout.FloatField(" headHeight", effect.headHeight); } else if (effect.posType == CySkillEditor.EffectConfigure.PosType.BONE) { effect.boneName = EditorGUILayout.TextField(" boneName", "" + effect.boneName); } else if (effect.posType == CySkillEditor.EffectConfigure.PosType.BODY) { effect.bodyHeight = EditorGUILayout.FloatField(" bodyHeight", effect.bodyHeight); } else if (effect.posType == CySkillEditor.EffectConfigure.PosType.FEET) { effect.feetWidth = EditorGUILayout.FloatField(" feetWidth", effect.feetWidth); } effect.position = EditorGUILayout.Vector3Field(" position", effect.position); effect.rotation = EditorGUILayout.Vector3Field(" rotation", effect.rotation); effect.lifeTime = (CySkillEditor.EffectConfigure.LifeTime)EditorGUILayout.Popup(" lifeTime", (int)effect.lifeTime, Enum.GetNames(typeof(CySkillEditor.EffectConfigure.LifeTime))); EditorGUILayout.EndVertical(); }
public EffectConfigure Copy() { EffectConfigure b = new EffectConfigure(); b.bodyHeight = bodyHeight; b.headHeight = headHeight; b.feetWidth = feetWidth; b.effectName = effectName; b.posType = posType; b.position = position; b.rotation = rotation; b.boneName = boneName; b.lifeTime = lifeTime; return(b); }
public void AddClipWithName(string effectName, float startTime, float PlayBackduration, GameObject effect, EffectConfigure config) { var clipData = ScriptableObject.CreateInstance <JParticleClipData>(); clipData.TargetObject = TimeLine.AffectedObject.gameObject; clipData.Effect = effect; clipData.EffectConfig = config; clipData.StartTime = startTime; clipData.ParticleName = effectName; clipData.EffectDuration = ((JTimelineParticle)TimeLine).GetEffectDuration(effectName);// ParticleSystemUtility.GetParticleDuration(effectName, TimeLine.AffectedObject.gameObject); clipData.PlaybackDuration = PlayBackduration; clipData.Track = this; AddClip(clipData); }