1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126 |
- using System;
- using System.Collections.Generic;
- using UnityEngine;
- namespace Xft
- {
- public class EffectLayer : MonoBehaviour
- {
- public Plane CollisionPlane
- {
- get
- {
- return this.mCollisionPlane;
- }
- }
- public Camera MyCamera
- {
- get
- {
- return this.Owner.MyCamera;
- }
- }
- protected void InitCollision()
- {
- if (!this.UseCollisionDetection)
- {
- return;
- }
- this.mCollisionPlane = new Plane(this.PlaneDir.normalized, base.transform.position + this.PlaneOffset);
- if (this.CollisionType == COLLITION_TYPE.CollisionLayer || this.CollisionType == COLLITION_TYPE.Plane)
- {
- return;
- }
- if (this.CollisionGoal == null)
- {
- }
- }
- public List<Affector> InitAffectors(EffectNode node)
- {
- List<Affector> list = new List<Affector>();
- if (this.UVAffectorEnable)
- {
- UVAnimation uvanimation = new UVAnimation();
- if (this.UVType == 1)
- {
- float x = this.OriUVDimensions.x / (float)this.Cols;
- float y = Mathf.Abs(this.OriUVDimensions.y / (float)this.Rows);
- Vector2 cellSize = new Vector2(x, y);
- uvanimation.BuildUVAnim(this.OriTopLeftUV, cellSize, this.Cols, this.Rows, this.Cols * this.Rows);
- }
- this.UVDimension = uvanimation.UVDimensions[0];
- this.UVTopLeft = uvanimation.frames[0];
- if (uvanimation.frames.Length != 1)
- {
- uvanimation.loopCycles = this.LoopCircles;
- Affector item = new UVAffector(uvanimation, this.UVTime, node, this.RandomStartFrame);
- list.Add(item);
- }
- }
- else
- {
- this.UVDimension = this.OriUVDimensions;
- this.UVTopLeft = this.OriTopLeftUV;
- }
- if (this.RotAffectorEnable && this.RotateType != RSTYPE.NONE)
- {
- Affector item2;
- if (this.RotateType == RSTYPE.NONE)
- {
- item2 = new RotateAffector(this.DeltaRot, node);
- }
- else
- {
- item2 = new RotateAffector(this.RotateType, node);
- }
- list.Add(item2);
- }
- if (this.ScaleAffectorEnable && this.ScaleType != RSTYPE.NONE)
- {
- Affector item3;
- if (this.ScaleType == RSTYPE.NONE)
- {
- item3 = new ScaleAffector(this.DeltaScaleX, this.DeltaScaleY, node);
- }
- else
- {
- item3 = new ScaleAffector(this.ScaleType, node);
- }
- list.Add(item3);
- }
- if (this.ColorAffectorEnable)
- {
- ColorAffector item4 = new ColorAffector(this, node);
- list.Add(item4);
- }
- if (this.JetAffectorEnable)
- {
- Affector item5 = new JetAffector(this.JetMag, this.JetMagType, this.JetCurve, node);
- list.Add(item5);
- }
- if (this.VortexAffectorEnable)
- {
- Affector item6 = new VortexAffector(this.VortexObj, this.VortexDirection, this.VortexInheritRotation, node);
- list.Add(item6);
- }
- if (this.UVRotAffectorEnable)
- {
- float rotXSpeed = this.UVRotXSpeed;
- float rotYSpeed = this.UVRotYSpeed;
- if (this.RandomUVRotateSpeed)
- {
- rotXSpeed = UnityEngine.Random.Range(this.UVRotXSpeed, this.UVRotXSpeedMax);
- rotYSpeed = UnityEngine.Random.Range(this.UVRotYSpeed, this.UVRotYSpeedMax);
- }
- Affector item7 = new UVRotAffector(rotXSpeed, rotYSpeed, node);
- list.Add(item7);
- }
- if (this.UVScaleAffectorEnable)
- {
- Affector item8 = new UVScaleAffector(node);
- list.Add(item8);
- }
- if (this.GravityAffectorEnable)
- {
- Affector item9 = new GravityAffector(this.GravityObject, this.GravityAftType, this.IsGravityAccelerate, this.GravityDirection, node);
- list.Add(item9);
- if (this.GravityAftType == GAFTTYPE.Spherical && this.GravityObject == null)
- {
- UnityEngine.Debug.LogWarning("Gravity UnityEngine.Object is missing, automatically set to effect layer self:" + base.gameObject.name);
- this.GravityObject = base.transform;
- }
- }
- if (this.AirAffectorEnable)
- {
- Affector item10 = new AirFieldAffector(this.AirObject, this.AirDirection, this.AirAttenuation, this.AirUseMaxDistance, this.AirMaxDistance, this.AirEnableSpread, this.AirSpread, this.AirInheritVelocity, this.AirInheritRotation, node);
- list.Add(item10);
- }
- if (this.BombAffectorEnable)
- {
- Affector item11 = new BombAffector(this.BombObject, this.BombType, this.BombDecayType, this.BombMagnitude, this.BombDecay, this.BombAxis, node);
- list.Add(item11);
- }
- if (this.TurbulenceAffectorEnable)
- {
- Affector item12 = new TurbulenceFieldAffector(this.TurbulenceObject, this.TurbulenceAttenuation, this.TurbulenceUseMaxDistance, this.TurbulenceMaxDistance, node);
- list.Add(item12);
- }
- if (this.DragAffectorEnable)
- {
- Affector item13 = new DragAffector(this.DragObj, this.DragUseDir, this.DragDir, this.DragMag, this.DragUseMaxDist, this.DragMaxDist, this.DragAtten, node);
- list.Add(item13);
- }
- if (this.SineAffectorEnable)
- {
- Affector item14 = new SineAffector(node);
- list.Add(item14);
- }
- return list;
- }
- public void SetClient(Transform client)
- {
- this.ClientTransform = client;
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode == null)
- {
- effectNode = this.AvailableENodes[i];
- }
- effectNode.ClientTrans = client;
- }
- }
- protected void Init()
- {
- this.InitCollision();
- this.Owner = base.transform.parent.gameObject.GetComponent<XffectComponent>();
- if (this.Owner == null)
- {
- UnityEngine.Debug.LogError("you must set EffectLayer to be XffectComponent's child.");
- }
- if (this.ClientTransform == null)
- {
- UnityEngine.Debug.LogWarning("effect layer: " + base.gameObject.name + " haven't assign a client transform, automaticly set to itself.");
- this.ClientTransform = base.transform;
- }
- this.AvailableENodes = new EffectNode[this.MaxENodes];
- this.ActiveENodes = new EffectNode[this.MaxENodes];
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = new EffectNode(i, this.ClientTransform, this.SyncClient, this);
- List<Affector> affectorList = this.InitAffectors(effectNode);
- effectNode.SetAffectorList(affectorList);
- effectNode.SetRenderType(this.RenderType);
- this.AvailableENodes[i] = effectNode;
- }
- if (this.RenderType == 4)
- {
- this.RopeDatas.Init(this);
- }
- this.AvailableNodeCount = this.MaxENodes;
- this.emitter = new Emitter(this);
- this.mStopped = false;
- }
- public VertexPool GetVertexPool()
- {
- return this.Vertexpool;
- }
- public int GetActiveNodeCount()
- {
- return this.ActiveENodes.Length;
- }
- public void RemoveActiveNode(EffectNode node)
- {
- if (this.AvailableNodeCount == this.MaxENodes)
- {
- UnityEngine.Debug.LogError("something wrong with removing node!");
- return;
- }
- if (this.ActiveENodes[node.Index] == null)
- {
- return;
- }
- this.ActiveENodes[node.Index] = null;
- this.AvailableENodes[node.Index] = node;
- this.AvailableNodeCount++;
- }
- public void AddActiveNode(EffectNode node)
- {
- if (this.AvailableNodeCount == 0)
- {
- UnityEngine.Debug.LogError("out index!");
- }
- if (this.AvailableENodes[node.Index] == null)
- {
- return;
- }
- this.ActiveENodes[node.Index] = node;
- this.AvailableENodes[node.Index] = null;
- this.AvailableNodeCount--;
- ulong totalAddedCount;
- this.TotalAddedCount = (totalAddedCount = this.TotalAddedCount) + 1UL;
- node.TotalIndex = totalAddedCount;
- }
- protected void AddNodes(int num)
- {
- int num2 = 0;
- for (int i = 0; i < this.MaxENodes; i++)
- {
- if (num2 == num)
- {
- break;
- }
- EffectNode effectNode = this.AvailableENodes[i];
- if (effectNode != null)
- {
- this.AddActiveNode(effectNode);
- num2++;
- if (this.UseSubEmitters && !string.IsNullOrEmpty(this.BirthSubEmitter))
- {
- XffectComponent effect = this.SpawnCache.GetEffect(this.BirthSubEmitter);
- if (effect == null)
- {
- return;
- }
- effectNode.SubEmitter = effect;
- effect.Active();
- }
- this.emitter.SetEmitPosition(effectNode);
- float life;
- if (this.IsNodeLifeLoop)
- {
- life = -1f;
- }
- else
- {
- life = UnityEngine.Random.Range(this.NodeLifeMin, this.NodeLifeMax);
- }
- Vector3 emitRotation = this.emitter.GetEmitRotation(effectNode);
- float speed = this.OriSpeed;
- if (this.IsRandomSpeed)
- {
- speed = UnityEngine.Random.Range(this.SpeedMin, this.SpeedMax);
- }
- Color oriColor = this.Color1;
- if (this.IsRandomStartColor)
- {
- oriColor = this.RandomColorGradient.Evaluate(UnityEngine.Random.Range(0f, 1f));
- }
- float num3 = UnityEngine.Random.Range(this.OriScaleXMin, this.OriScaleXMax);
- float oriScaleY = UnityEngine.Random.Range(this.OriScaleYMin, this.OriScaleYMax);
- if (this.UniformRandomScale)
- {
- oriScaleY = num3;
- }
- effectNode.Init(emitRotation.normalized, speed, life, UnityEngine.Random.Range(this.OriRotationMin, this.OriRotationMax), num3, oriScaleY, oriColor, this.UVTopLeft, this.UVDimension);
- }
- }
- }
- public void Reset()
- {
- if (this.ActiveENodes == null)
- {
- return;
- }
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode != null)
- {
- effectNode.Reset();
- this.RemoveActiveNode(effectNode);
- }
- }
- this.emitter.Reset();
- this.mStopped = false;
- this.TotalAddedCount = 0UL;
- }
- public void FixedUpdateCustom(float deltaTime)
- {
- int nodes = this.emitter.GetNodes(deltaTime);
- this.AddNodes(nodes);
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode != null)
- {
- effectNode.Update(deltaTime);
- }
- }
- if (this.RenderType == 4)
- {
- this.RopeDatas.Update(deltaTime);
- }
- }
- public void StartCustom()
- {
- this.Init();
- this.LastClientPos = this.ClientTransform.position;
- }
- private void OnDrawGizmos()
- {
- if (this.ClientTransform == null)
- {
- return;
- }
- Gizmos.color = this.DebugColor;
- float num;
- if (this.RenderType == 0)
- {
- num = (this.SpriteWidth + this.SpriteHeight) / 6f;
- }
- else if (this.RenderType == 1)
- {
- num = this.RibbonWidth / 3f;
- }
- else
- {
- num = (this.ConeSize.x + this.ConeSize.y) / 6f;
- }
- num = Mathf.Clamp(num, 0f, 1f);
- if (this.EmitType == 0 || this.EmitType == 3)
- {
- Gizmos.DrawWireSphere(this.ClientTransform.position + this.EmitPoint, num);
- }
- if (this.EmitType == 1)
- {
- Vector3 size = this.BoxSize;
- if (this.Owner != null)
- {
- size = this.BoxSize * this.Owner.Scale;
- }
- Gizmos.DrawWireCube(this.ClientTransform.position + this.EmitPoint, size);
- }
- else if (this.EmitType == 2)
- {
- Gizmos.DrawWireSphere(this.ClientTransform.position + this.EmitPoint, this.Radius);
- }
- else if (this.EmitType == 4)
- {
- if (this.LineStartObj != null && this.LineEndObj != null)
- {
- Vector3 position = this.LineStartObj.position;
- Vector3 position2 = this.LineEndObj.position;
- Gizmos.DrawLine(position, position2);
- }
- }
- else if (this.EmitType == 5)
- {
- }
- if (this.OriVelocityAxis != Vector3.zero)
- {
- Gizmos.DrawLine(this.ClientTransform.position + this.EmitPoint, this.ClientTransform.position + this.EmitPoint + this.ClientTransform.rotation * this.OriVelocityAxis * num * 15f);
- }
- if (this.UseCollisionDetection && this.CollisionType == COLLITION_TYPE.Plane)
- {
- Gizmos.color = Color.green;
- Gizmos.DrawWireCube(this.ClientTransform.position + this.PlaneOffset, new Vector3(num * 300f, 0f, num * 300f));
- Gizmos.color = Color.white;
- }
- }
- public bool EmitOver(float deltaTime)
- {
- if (this.ActiveENodes == null)
- {
- return false;
- }
- if (this.AvailableNodeCount == this.MaxENodes)
- {
- if (this.EmitWay == EEmitWay.ByRate)
- {
- if (this.emitter.EmitLoop == 0f)
- {
- return true;
- }
- }
- else if (this.EmitWay == EEmitWay.ByCurve)
- {
- if (this.emitter.CurveEmitDone)
- {
- return true;
- }
- }
- else if (this.EmitWay == EEmitWay.ByDistance && this.mStopped)
- {
- return true;
- }
- }
- return false;
- }
- public void StopSmoothly(float fadeTime)
- {
- this.mStopped = true;
- this.emitter.StopEmit();
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode != null)
- {
- if (!this.IsNodeLifeLoop && effectNode.GetLifeTime() < fadeTime)
- {
- fadeTime = effectNode.GetLifeTime() - effectNode.GetElapsedTime();
- }
- effectNode.Fade(fadeTime);
- }
- }
- }
- public void StopEmit()
- {
- this.mStopped = true;
- if (this.IsNodeLifeLoop && this.EmitWay != EEmitWay.ByDistance)
- {
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode != null)
- {
- effectNode.Stop();
- }
- }
- }
- this.emitter.StopEmit();
- }
- public void SetCollisionGoalPos(Transform pos)
- {
- if (!this.UseCollisionDetection)
- {
- UnityEngine.Debug.LogWarning(base.gameObject.name + "is not set to collision detect mode, please check it");
- return;
- }
- this.CollisionGoal = pos;
- }
- public void SetArractionAffectorGoal(Transform goal)
- {
- if (!this.GravityAffectorEnable || this.GravityAftType == GAFTTYPE.Planar)
- {
- UnityEngine.Debug.LogWarning(base.gameObject.name + "has no attraction affector, please check it");
- return;
- }
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.AvailableENodes[i];
- if (effectNode == null)
- {
- effectNode = this.ActiveENodes[i];
- }
- List<Affector> affectorList = effectNode.GetAffectorList();
- foreach (Affector affector in affectorList)
- {
- if (affector.Type == AFFECTORTYPE.GravityAffector)
- {
- GravityAffector gravityAffector = (GravityAffector)affector;
- gravityAffector.SetAttraction(goal);
- }
- }
- }
- }
- public void SetScale(Vector2 scale)
- {
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode == null)
- {
- effectNode = this.AvailableENodes[i];
- }
- effectNode.Scale = scale;
- }
- }
- public void SetColor(Color c)
- {
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode == null)
- {
- effectNode = this.AvailableENodes[i];
- }
- effectNode.Color = c;
- }
- }
- public void SetRotation(float angle)
- {
- for (int i = 0; i < this.MaxENodes; i++)
- {
- EffectNode effectNode = this.ActiveENodes[i];
- if (effectNode == null)
- {
- effectNode = this.AvailableENodes[i];
- }
- effectNode.RotateAngle = angle;
- }
- }
- public EffectNode EmitByPos(Vector3 pos)
- {
- int num = 0;
- EffectNode result = null;
- for (int i = 0; i < this.MaxENodes; i++)
- {
- if (num == 1)
- {
- break;
- }
- EffectNode effectNode = this.AvailableENodes[i];
- if (effectNode != null)
- {
- this.AddActiveNode(effectNode);
- num++;
- effectNode.SetLocalPosition(pos);
- float life;
- if (this.IsNodeLifeLoop)
- {
- life = -1f;
- }
- else
- {
- life = UnityEngine.Random.Range(this.NodeLifeMin, this.NodeLifeMax);
- }
- Vector3 emitRotation = this.emitter.GetEmitRotation(effectNode);
- Color oriColor = this.Color1;
- if (this.IsRandomStartColor)
- {
- oriColor = this.RandomColorGradient.Evaluate(UnityEngine.Random.Range(0f, 1f));
- }
- effectNode.Init(emitRotation.normalized, this.OriSpeed, life, UnityEngine.Random.Range(this.OriRotationMin, this.OriRotationMax), UnityEngine.Random.Range(this.OriScaleXMin, this.OriScaleXMax), UnityEngine.Random.Range(this.OriScaleYMin, this.OriScaleYMax), oriColor, this.UVTopLeft, this.UVDimension);
- result = effectNode;
- }
- }
- return result;
- }
- public VertexPool Vertexpool;
- public Transform ClientTransform;
- public bool SyncClient;
- public Material Material;
- public int RenderType;
- public float StartTime;
- public float MaxFps = 60f;
- public Color DebugColor = Color.white;
- public int Depth;
- public int SpriteType;
- public int OriPoint;
- public float SpriteWidth = 1f;
- public float SpriteHeight = 1f;
- public UV_STRETCH SpriteUVStretch;
- public bool RandomOriScale;
- public bool RandomOriRot;
- public int OriRotationMin;
- public int OriRotationMax;
- public bool RotAffectorEnable;
- public RSTYPE RotateType;
- public float DeltaRot;
- public AnimationCurve RotateCurve = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 0f),
- new Keyframe(1f, 360f)
- });
- public WRAP_TYPE RotateCurveWrap;
- public float RotateCurveTime = 1f;
- public float RotateCurveMaxValue = 1f;
- public AnimationCurve RotateCurve01 = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 0f),
- new Keyframe(1f, 1f)
- });
- public float RotateSpeedMin;
- public float RotateSpeedMax;
- public bool UniformRandomScale;
- public float OriScaleXMin = 1f;
- public float OriScaleXMax = 1f;
- public float OriScaleYMin = 1f;
- public float OriScaleYMax = 1f;
- public bool ScaleAffectorEnable;
- public RSTYPE ScaleType;
- public float DeltaScaleX;
- public float DeltaScaleY;
- public AnimationCurve ScaleXCurve = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 1f),
- new Keyframe(1f, 5f)
- });
- public AnimationCurve ScaleYCurve = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 1f),
- new Keyframe(1f, 5f)
- });
- public WRAP_TYPE ScaleWrapMode;
- public float ScaleCurveTime = 1f;
- public float MaxScaleCalue = 1f;
- public float MaxScaleValueY = 1f;
- public AnimationCurve ScaleXCurveNew = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 0f),
- new Keyframe(1f, 1f)
- });
- public AnimationCurve ScaleYCurveNew = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 0f),
- new Keyframe(1f, 1f)
- });
- public bool UseSameScaleCurve;
- public float DeltaScaleXMax;
- public float DeltaScaleYMax;
- public bool ColorAffectorEnable;
- public int ColorAffectType;
- public float ColorGradualTimeLength = 1f;
- public COLOR_GRADUAL_TYPE ColorGradualType;
- public bool IsRandomStartColor;
- public ColorParameter RandomColorParam;
- public Gradient RandomColorGradient;
- public Color Color1 = Color.white;
- public Color Color2;
- public Color Color3;
- public Color Color4;
- public Color Color5;
- public COLOR_CHANGE_TYPE ColorChangeType;
- public ColorParameter ColorParam;
- public Gradient ColorGradient;
- public AnimationCurve ColorGradualCurve = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 0f),
- new Keyframe(1f, 1f)
- });
- public float RibbonWidth = 1f;
- public int MaxRibbonElements = 8;
- public float RibbonLen = 15f;
- public float TailDistance;
- public bool SyncTrailWithClient;
- public UV_STRETCH RibbonUVStretch;
- public bool FaceToObject;
- public Transform FaceObject;
- public bool UseRandomRibbon;
- public float RibbonWidthMin = 1f;
- public float RibbonWidthMax = 1f;
- public float RibbonLenMin = 15f;
- public float RibbonLenMax = 15f;
- public Vector2 ConeSize = new Vector2(1f, 3f);
- public float ConeAngle;
- public int ConeSegment = 12;
- public bool UseConeAngleChange;
- public AnimationCurve ConeDeltaAngle = new AnimationCurve(new Keyframe[]
- {
- new Keyframe(0f, 0f),
- new Keyframe(1f, 60f)
- });
- public Mesh CMesh;
- public Vector3 MeshRotateAxis = Vector3.up;
- public int EmitType;
- public Vector3 BoxSize;
- public Vector3 EmitPoint;
- public float Radius = 1f;
- public bool UseRandomCircle;
- public float CircleRadiusMin = 1f;
- public float CircleRadiusMax = 10f;
- public Vector3 CircleDir = Vector3.up;
- public bool EmitUniform;
- public Transform LineStartObj;
- public Transform LineEndObj;
- public int MaxENodes = 1;
- public bool IsNodeLifeLoop = true;
- public float NodeLifeMin = 1f;
- public float NodeLifeMax = 1f;
- public EEmitWay EmitWay;
- public XCurveParam EmitterCurveX;
- public float DiffDistance = 0.1f;
- public Mesh EmitMesh;
- public int EmitMeshType;
- public bool IsBurstEmit;
- public float ChanceToEmit = 100f;
- public float EmitDuration = 100f;
- public float EmitRate = 20f;
- public int EmitLoop = -1;
- public DIRECTION_TYPE DirType;
- public Vector3 OriVelocityAxis = Vector3.up;
- public int AngleAroundAxis;
- public bool UseRandomDirAngle;
- public int AngleAroundAxisMax;
- public float OriSpeed;
- public bool AlwaysSyncRotation;
- public bool IsRandomSpeed;
- public float SpeedMin;
- public float SpeedMax;
- public bool JetAffectorEnable;
- public MAGTYPE JetMagType;
- public float JetMag;
- public AnimationCurve JetCurve;
- public XCurveParam JetCurveX;
- public bool VortexAffectorEnable;
- public MAGTYPE VortexMagType;
- public float VortexMag = 1f;
- public XCurveParam VortexCurveX;
- public AnimationCurve VortexCurve;
- public Vector3 VortexDirection = Vector3.up;
- public bool VortexInheritRotation = true;
- public Transform VortexObj;
- public bool IsFixedCircle;
- public bool IsRandomVortexDir;
- public bool IsVortexAccelerate;
- public float VortexAttenuation;
- public bool UseVortexMaxDistance;
- public float VortexMaxDistance;
- public bool UVRotAffectorEnable;
- public bool RandomUVRotateSpeed;
- public float UVRotXSpeed;
- public float UVRotYSpeed;
- public float UVRotXSpeedMax;
- public float UVRotYSpeedMax;
- public Vector2 UVRotStartOffset = Vector2.zero;
- public bool UVScaleAffectorEnable;
- public float UVScaleXSpeed;
- public float UVScaleYSpeed;
- public bool GravityAffectorEnable;
- public GAFTTYPE GravityAftType;
- public MAGTYPE GravityMagType;
- public float GravityMag;
- public AnimationCurve GravityCurve;
- public XCurveParam GravityCurveX;
- public Vector3 GravityDirection = Vector3.up;
- public Transform GravityObject;
- public bool IsGravityAccelerate = true;
- public bool AirAffectorEnable;
- public Transform AirObject;
- public MAGTYPE AirMagType;
- public float AirMagnitude;
- public AnimationCurve AirMagCurve;
- public XCurveParam AirMagCurveX;
- public Vector3 AirDirection = Vector3.up;
- public float AirAttenuation;
- public bool AirUseMaxDistance;
- public float AirMaxDistance;
- public bool AirEnableSpread;
- public float AirSpread;
- public float AirInheritVelocity;
- public bool AirInheritRotation;
- public bool BombAffectorEnable;
- public Transform BombObject;
- public BOMBTYPE BombType = BOMBTYPE.Spherical;
- public BOMBDECAYTYPE BombDecayType;
- public float BombMagnitude;
- public Vector3 BombAxis;
- public float BombDecay;
- public bool TurbulenceAffectorEnable;
- public Transform TurbulenceObject;
- public MAGTYPE TurbulenceMagType;
- public float TurbulenceMagnitude = 1f;
- public XCurveParam TurbulenceMagCurveX;
- public AnimationCurve TurbulenceMagCurve;
- public float TurbulenceAttenuation;
- public bool TurbulenceUseMaxDistance;
- public float TurbulenceMaxDistance;
- public Vector3 TurbulenceForce = Vector3.one;
- public bool DragAffectorEnable;
- public Transform DragObj;
- public bool DragUseDir;
- public Vector3 DragDir = Vector3.up;
- public float DragMag = 10f;
- public bool DragUseMaxDist;
- public float DragMaxDist = 50f;
- public float DragAtten;
- public bool UVAffectorEnable;
- public int UVType;
- public Vector2 OriTopLeftUV = Vector2.zero;
- public Vector2 OriUVDimensions = Vector2.one;
- protected Vector2 UVTopLeft;
- protected Vector2 UVDimension;
- public int Cols = 1;
- public int Rows = 1;
- public int LoopCircles = -1;
- public float UVTime = 1f;
- public string EanPath = "none";
- public int EanIndex;
- public bool RandomStartFrame;
- public bool UseCollisionDetection;
- public float ParticleRadius = 1f;
- public COLLITION_TYPE CollisionType;
- public bool CollisionAutoDestroy = true;
- public Transform EventReceiver;
- public string EventHandleFunctionName = " ";
- public Transform CollisionGoal;
- public float ColliisionPosRange;
- public LayerMask CollisionLayer;
- public Vector3 PlaneDir = Vector3.up;
- public Vector3 PlaneOffset = new Vector3(0f, -10f, 0f);
- protected Plane mCollisionPlane;
- public float RopeWidth = 1f;
- public float RopeUVLen = 5f;
- public bool RopeFixUVLen = true;
- public bool SineAffectorEnable;
- public MAGTYPE SineMagType;
- public float SineMagnitude = 1f;
- public float SineTime = 1f;
- public XCurveParam SineMagCurveX;
- public Vector3 SineForce = Vector3.up;
- public bool SineIsAccelarate;
- public bool UseShaderCurve1;
- public bool UseShaderCurve2;
- public XCurveParam ShaderCurveX1;
- public XCurveParam ShaderCurveX2;
- protected ulong TotalAddedCount;
- public bool UseSubEmitters;
- public XffectCache SpawnCache;
- public string BirthSubEmitter;
- public string CollisionSubEmitter;
- public string DeathSubEmitter;
- public bool SubEmitterAutoStop = true;
- public Emitter emitter;
- public EffectNode[] AvailableENodes;
- public EffectNode[] ActiveENodes;
- public int AvailableNodeCount;
- public Vector3 LastClientPos;
- public XffectComponent Owner;
- public bool mStopped;
- public RopeData RopeDatas = new RopeData();
- }
- }
|