public void MaterialSelection(MoveData.MoveTypes MoveType, GameObject ThisObject) { ParticleSystem PS = ThisObject.GetComponent <ParticleSystem>(); switch (MoveType) { case MoveData.MoveTypes.Fire: PS.ParticleRendererSettings(true, "Capsule", "Fire", "Fire", ParticleSystemRenderMode.Mesh); break; case MoveData.MoveTypes.Lightning: PS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Mesh); break; case MoveData.MoveTypes.Ice: PS.ParticleRendererSettings(true, "Capsule", "nomat", "ICE", ParticleSystemRenderMode.Mesh); break; case MoveData.MoveTypes.Rock: PS.ParticleRendererSettings(true, "Capsule", "RockMat", "nomat", ParticleSystemRenderMode.Mesh); break; default: break; } }
// Update is called once per frame void Update() { // transform.LookAt(Target.transform); if (MoveType != GetComponentInParent <PlayerHit>().CurrentMove) { PS.Clear(); MoveType = GetComponentInParent <PlayerHit>().CurrentMove; InitPS(); } }
public GameObject AddSubParticle(GameObject OriginalGameObject, MoveData.MoveTypes moveType, TempMoves tempMove) { GameObject SubObject = new GameObject(); SubObject.transform.SetParent(OriginalGameObject.transform); SubObject.transform.position = OriginalGameObject.transform.position; SubObject.AddComponent <ParticleSystem>(); SubGameObjects.Add(SubObject); SelectMaterials(SubObject, moveType, tempMove); return(SubObject); }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { PS.Play(); } Input.GetMouseButtonDown(0); // transform.LookAt(Target.transform); if (MoveType != GetComponentInParent <PlayerHit>().CurrentMove) { PS.Clear(); MoveType = GetComponentInParent <PlayerHit>().CurrentMove; InitPS(); } }
public void AddObjectAndParticleSystem(Vector3 ObjectPosition, MoveData.MoveTypes moveType, TempMoves tempMoves, Vector3 StartPosition, Transform transformParent) { GameObject MoveObject = new GameObject(); MoveObject.transform.SetParent(transformParent.parent); if (tempMoves == TempMoves.Beam) { MoveObject.transform.position = transformParent.position; MoveObject.transform.rotation = new Quaternion(0f, 0f, 0f, 0f); MoveObject.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f); } if (tempMoves == TempMoves.Storm) { MoveObject.transform.position = ObjectPosition; } MoveObject.AddComponent <ParticleSystem>(); GameObjects.Add(MoveObject); BaseMove(tempMoves, MoveObject, moveType); }
// Update is called once per frame void Update() { if (Input.GetAxis("Mouse ScrollWheel") < 0) // Scoll down { MoveSelectionCount -= 1; if (MoveSelectionCount < 0) { MoveSelectionCount = MoveSelectionMax - 1; } CurrentMove = MoveSelection[MoveSelectionCount]; } else if (Input.GetAxis("Mouse ScrollWheel") > 0) // Scroll UP { MoveSelectionCount += 1; if (MoveSelectionCount > MoveSelectionMax) { MoveSelectionCount = 0; } CurrentMove = MoveSelection[MoveSelectionCount]; } }
public void selectParticleEffects(GameObject ThisGameObject, MoveData.MoveTypes moveType) { ParticleSystem PS = ThisGameObject.GetComponent <ParticleSystem>(); AnimationCurve EmissionCurve; AnimationCurve SizeCurve; ParticleSystem SPS; AnimationCurve SPSCurve; ParticleSystem.Burst[] Bursts; string[] Layers = new string[] { "Players" }; if (SubObject != null) { GameObject.Destroy(SubObject); SubObject = null; } SubObject = new GameObject(); SubObject.AddComponent <ParticleSystem>(); SubObject.transform.SetParent(PS.transform.parent); SubObject.transform.position = PS.transform.parent.position; switch (moveType) { case MoveData.MoveTypes.Fire: // Main Settings PS.ParticleMainSettings(true, 0, 1f, 100f, 2f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 1f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 1f); SizeCurve.AddKey(2f, 3f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, false, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 2, true, false); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 1, 0.1f, 1); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "nomat", "Fire", ParticleSystemRenderMode.Mesh); // Velocity Settings PS.ParticleInheritVelocity(); // Sub Particle Settings SPS = SubObject.GetComponent <ParticleSystem>(); SPSCurve = new AnimationCurve(); SPSCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 1, 1) }; SPS.ParticleEmissionSettings(true, 1f, false, true, Bursts); SPS.ParticleMainSettings(true, 0f, 1f, 1f, 1f, 1f); SPS.ParticleNoiseSettings(true, 0, 0, 0); SPS.ParticleShapeSettings(true, ParticleSystemShapeType.Donut, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); SPS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 0.1f, false, false); SPS.ParticleRendererSettings(true, "Capsule", "nomat", "Fire", ParticleSystemRenderMode.Stretch); PS.ParticleSubSettings(true, SubObject); break; case MoveData.MoveTypes.Lightning: // Main Settings PS.ParticleMainSettings(true, 0, 1f, 300f, 1f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 3f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 0.5f); SizeCurve.AddKey(2f, 0f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 6, true, true); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 6, 6, 6); // Light Settings PS.ParticleLightSettings(true, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Mesh); // Rotation Settings: PS.ParticleRotationSettings(); // Sub Particle Settings SPS = SubObject.GetComponent <ParticleSystem>(); SPSCurve = new AnimationCurve(); SPSCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 1, 1) }; SPS.ParticleEmissionSettings(true, 1f, false, true, Bursts); SPS.ParticleMainSettings(true, 0f, 1f, 15f, 0.5f, 0.5f); SPS.ParticleNoiseSettings(true, 10, 1, 10); SPS.ParticleShapeSettings(true, ParticleSystemShapeType.Donut, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); SPS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 0.1f, false, false); SPS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Stretch); PS.ParticleSubSettings(true, SubObject); break; case MoveData.MoveTypes.Ice: // Main Settings PS.ParticleMainSettings(true, 0, 1f, 400f, 6f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 2f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 1f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 6, true, false); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 0, 0, 0); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "nomat", "ICE", ParticleSystemRenderMode.Mesh); // Rotation Settings: PS.ParticleRotationSettings(); break; case MoveData.MoveTypes.Rock: // Main Settings PS.ParticleMainSettings(true, 0, 15f, 100f, 6f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 1f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 1f); PS.ParticleSizeOverLifetimeSettings(false, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(false, ParticleSystemTrailTextureMode.Stretch, 1, true, false); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 0, 0, 0); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "RockMat", "RockTrailMat", ParticleSystemRenderMode.Mesh); // Rotation Settings: PS.ParticleRotationSettings(); break; default: break; } }
public void SelectMaterials(GameObject ThisObject, MoveData.MoveTypes MoveType, TempMoves tempMove) { ParticleSystem PS = ThisObject.GetComponent <ParticleSystem>(); ParticleSystem.Burst[] Bursts; AnimationCurve EmissionCurve; AnimationCurve SizeCurve; switch (MoveType) { case MoveData.MoveTypes.Fire: if (tempMove == TempMoves.Storm) { EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 5, 6, 1f) }; PS.ParticleEmissionSettings(true, 1f, false, true, Bursts); PS.ParticleMainSettings(true, 100f, 1f, 100f, 2f, 3f); PS.ParticleNoiseSettings(true, 10, 15f, 10); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Sphere, ParticleSystemShapeMultiModeValue.Random, false, 0f, 0f, 10f); PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 5f, false, false); // Render Settings PS.ParticleRendererSettings(true, "Capsule", "Fire", "Fire", ParticleSystemRenderMode.Mesh); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers, 1f, 1f); } break; case MoveData.MoveTypes.Lightning: if (tempMove == TempMoves.Storm) { EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 5, 6, 1f) }; PS.ParticleEmissionSettings(true, 1f, false, true, Bursts); PS.ParticleMainSettings(true, 100f, 1f, 50f, 2f, 3f); PS.ParticleNoiseSettings(true, 10, 15f, 10); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Sphere, ParticleSystemShapeMultiModeValue.Random, false, 0f, 0f, 10f); PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 5f, false, false); PS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Stretch); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); } if (tempMove == TempMoves.Beam) { Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(0.1f, 5), new ParticleSystem.Burst(0.2f, 5), new ParticleSystem.Burst(0.3f, 5), new ParticleSystem.Burst(0.4f, 5) }; PS.ParticleEmissionSettings(true, 1f, false, true, Bursts); PS.ParticleMainSettings(false, 0f, 0.1f, 20f, 0.4f, 0.1f); PS.ParticleNoiseSettings(true, 10, 15f, 10); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Random, false, 0f, 0f, 0f); PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 0.1f, false, false); PS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Stretch); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); } break; case MoveData.MoveTypes.Ice: if (tempMove == TempMoves.Storm) { EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 5, 6, 1f) }; PS.ParticleEmissionSettings(true, 1f, false, true, Bursts); PS.ParticleMainSettings(true, 100f, 1f, 100f, 2f, 3f); PS.ParticleNoiseSettings(true, 10, 15f, 10); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Sphere, ParticleSystemShapeMultiModeValue.Random, false, 0f, 0f, 10f); PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 5f, false, false); PS.ParticleRendererSettings(true, null, "ICE", "ICE", ParticleSystemRenderMode.Billboard); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers, 1f, 1f); } break; case MoveData.MoveTypes.Rock: if (tempMove == TempMoves.Storm) { EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 5, 6, 1f) }; PS.ParticleEmissionSettings(true, 1f, false, true, Bursts); PS.ParticleMainSettings(true, 1f, 2f, 6f, 4f, 3f); PS.ParticleNoiseSettings(false, 10, 15f, 10); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Sphere, ParticleSystemShapeMultiModeValue.Random, false, 0f, 0f, 10f); PS.ParticleTrailSettings(false, ParticleSystemTrailTextureMode.Stretch, 5f, false, false); PS.ParticleRendererSettings(true, "Capsule", "RockMat", "RockMat", ParticleSystemRenderMode.Mesh); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers, 0.5f, 0.5f); } if (tempMove == TempMoves.Beam) { Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(0.1f, 2), new ParticleSystem.Burst(0.3f, 2), new ParticleSystem.Burst(0.5f, 2) }; PS.ParticleEmissionSettings(false, 1f, false, true, Bursts); PS.ParticleMainSettings(true, 1f, 0.1f, 6f, 4f, 0.1f); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Sphere, ParticleSystemShapeMultiModeValue.Random, false, 0f, 0f, 1f); PS.ParticleTrailSettings(false, ParticleSystemTrailTextureMode.Stretch, 5f, false, false); PS.ParticleRendererSettings(true, "Capsule", "RockMat", "RockMat", ParticleSystemRenderMode.Mesh); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers, 0.5f, 0.5f); } break; default: break; } }
public void BaseMove(TempMoves tempMove, GameObject ThisObject, MoveData.MoveTypes moveTypes) { ParticleSystem PS = ThisObject.GetComponent <ParticleSystem>(); ParticleSystem.Burst[] Bursts; AnimationCurve EmissionCurve; AnimationCurve SizeCurve; switch (tempMove) { case TempMoves.Storm: // Main Settings PS.ParticleMainSettings(false, 0f, 15f, 3f, 6f); // Emission Settings Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(0.0f, 3), new ParticleSystem.Burst(0.1f, 2), new ParticleSystem.Burst(0.2f, 1) }; EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 3f); PS.ParticleEmissionSettings(true, 1f, true, true, Bursts); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 0f); SizeCurve.AddKey(0.5f, 15f); SizeCurve.AddKey(1f, 0f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, false, 0f, 0f, 0f, 0f, 0f, 0f); // Collision Settings PS.ParticleCollisionSettings(false, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Sub Particle Settings PS.ParticleSubSettings(true, AddSubParticle(ThisObject, moveTypes, tempMove)); // Rotation Settings PS.ParticleRotationSettings(true, 1, 0f, ParticleSystemCurveMode.TwoConstants); // Renderer PS.ParticleRendererSettings(true, null, "Smoke", "nomat", ParticleSystemRenderMode.HorizontalBillboard); break; case TempMoves.Beam: if (moveTypes == MoveData.MoveTypes.Rock) { Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(0.0f, 2), new ParticleSystem.Burst(1.1f, 1), new ParticleSystem.Burst(2.2f, 2), new ParticleSystem.Burst(3.4f, 1), new ParticleSystem.Burst(4.5f, 2) }; PS.ParticleMainSettings(false, 1f, 1f, 80f, 3f, 0f); PS.ParticleEmissionSettings(true, 1f, true, true, Bursts, null, ParticleSystemCurveMode.Constant, 6); PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.BurstSpread, false, 0f, 0f, 0.7f, 0f, 0f, 0f); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers, 0f, 1f); } else { PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, false, 0f, 0f, 0f, 0f, 0f, 0f); SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 1f); SizeCurve.AddKey(0.5f, 3f); SizeCurve.AddKey(1f, 1f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); } if (moveTypes == MoveData.MoveTypes.Fire) { PS.ParticleMainSettings(false, 0f, 1f, 10f, 10f, 0f); PS.ParticleEmissionSettings(true, 1f, true, false, null, null, ParticleSystemCurveMode.Constant, 20); } if (moveTypes == MoveData.MoveTypes.Lightning) { PS.ParticleMainSettings(false, 0f, 1f, 100f, 0.5f, 0f); PS.ParticleEmissionSettings(true, 1f, true, false, null, null, ParticleSystemCurveMode.Constant, 20); PS.ParticleNoiseSettings(true, 10, 14, 10); } if (moveTypes == MoveData.MoveTypes.Ice) { PS.ParticleMainSettings(false, 0f, 1f, 10f, 3f, 0f); PS.ParticleEmissionSettings(true, 1f, true, false, null, null, ParticleSystemCurveMode.Constant, 20); } PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); PS.ParticleSubSettings(true, AddSubParticle(ThisObject, moveTypes, tempMove)); PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.DistributePerSegment, 1f, true, true); PS.ParticleRotationSettings(true, 1, 0f, ParticleSystemCurveMode.TwoConstants, 100f, 200f); MaterialSelection(moveTypes, ThisObject); break; case TempMoves.Ball: break; case TempMoves.Walk: break; case TempMoves.Burst: break; default: break; } }
public void selectParticleEffects(GameObject ThisGameObject, MoveData.MoveTypes moveType, MoveData.MoveBehaviorsGeneric Behavior) { ParticleSystem PS = ThisGameObject.GetComponent <ParticleSystem>(); AnimationCurve EmissionCurve; AnimationCurve SizeCurve; ParticleSystem SPS; AnimationCurve SPSCurve; ParticleSystem.Burst[] Bursts; string[] Layers = new string[] { "Players" }; if (SubObject != null) { GameObject.Destroy(SubObject); SubObject = null; } SubObject = new GameObject(); SubObject.AddComponent <ParticleSystem>(); SubObject.transform.SetParent(PS.transform.parent); SubObject.transform.position = PS.transform.parent.position; SubObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); switch (moveType) { case MoveData.MoveTypes.Fire: // Main Settings PS.ParticleMainSettings(false, 0, 2f, 25f, 7f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 1f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 3f); SizeCurve.AddKey(2f, 10f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, false, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.DistributePerSegment, 2, true, false); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 0, 0f, 0); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "FireTrail", "nomat", ParticleSystemRenderMode.Mesh); // Velocity Settings PS.ParticleInheritVelocity(); // Rotation Settings PS.ParticleRotationSettings(true, 1, 50f); // Sub Particle Settings SPS = SubObject.GetComponent <ParticleSystem>(); SPSCurve = new AnimationCurve(); SPSCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 5, 1) }; SPS.ParticleEmissionSettings(true, 1f, false, true, Bursts); SPS.ParticleMainSettings(true, 1f, 1f, 20f, 2f, 1f); SPS.ParticleNoiseSettings(true, 1, 0, 0); SPS.ParticleShapeSettings(true, ParticleSystemShapeType.Sphere, ParticleSystemShapeMultiModeValue.PingPong, false, 0f, 1f, 1f); SPS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 2f, false, false); SPS.ParticleRendererSettings(true, "Capsule", "Fire", "SMK", ParticleSystemRenderMode.Billboard); PS.ParticleSubSettings(true, SubObject); break; case MoveData.MoveTypes.Lightning: // Main Settings PS.ParticleMainSettings(false, 0, 1f, 300f, 1f); // Emission Settings Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(0f, 1, 1, 0.01f) }; EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 1f); PS.ParticleEmissionSettings(true, 1, false, true, Bursts, null); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 4f); SizeCurve.AddKey(2f, 0f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 6, true, true); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 6, 6, 6); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Rotation Settings: PS.ParticleRotationSettings(); // Sub Particle Settings SPS = SubObject.GetComponent <ParticleSystem>(); SPSCurve = new AnimationCurve(); SPSCurve.AddKey(0f, 10f); Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(1f, 1, 1) }; SPS.ParticleEmissionSettings(true, 1f, false, true, Bursts); SPS.ParticleMainSettings(true, 0f, 1f, 1f, 0.5f, 3f); SPS.ParticleNoiseSettings(true, 10, 1, 10); SPS.ParticleShapeSettings(true, ParticleSystemShapeType.Donut, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); SPS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 0.1f, false, false); SPS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Stretch); PS.ParticleSubSettings(true, SubObject); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Mesh); break; case MoveData.MoveTypes.Ice: // Main Settings PS.ParticleMainSettings(false, 0, 1f, 400f, 6f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 2f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 1f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 6, true, false); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 0, 0, 0); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "nomat", "ICE", ParticleSystemRenderMode.Mesh); // Rotation Settings: PS.ParticleRotationSettings(); break; case MoveData.MoveTypes.Rock: // Main Settings PS.ParticleMainSettings(false, 0, 15f, 100f, 6f); // Emission Settings EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 1f); PS.ParticleEmissionSettings(true, 1, true, false, null, EmissionCurve); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 1f); PS.ParticleSizeOverLifetimeSettings(false, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, true, 0f, 0f, 0f); // Trail Settings PS.ParticleTrailSettings(false, ParticleSystemTrailTextureMode.Stretch, 1, true, false); // Collision Settings PS.ParticleCollisionSettings(true, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(true, 0, 0, 0); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Renderer settings PS.ParticleRendererSettings(true, "Capsule", "RockMat", "RockTrailMat", ParticleSystemRenderMode.Mesh); // Rotation Settings: PS.ParticleRotationSettings(); break; case MoveData.MoveTypes.Storm: // Main Settings PS.ParticleMainSettings(false, 0f, 15f, 3f, 6f); // Emission Settings Bursts = new ParticleSystem.Burst[] { new ParticleSystem.Burst(0.0f, 3), new ParticleSystem.Burst(0.1f, 2), new ParticleSystem.Burst(0.2f, 1) }; EmissionCurve = new AnimationCurve(); EmissionCurve.AddKey(0f, 3f); PS.ParticleEmissionSettings(true, 1f, true, true, Bursts); // Size Settings SizeCurve = new AnimationCurve(); SizeCurve.AddKey(0f, 0f); SizeCurve.AddKey(0.5f, 30f); SizeCurve.AddKey(1f, 0f); PS.ParticleSizeOverLifetimeSettings(true, 1, SizeCurve); // Shape Settings PS.ParticleShapeSettings(true, ParticleSystemShapeType.Cone, ParticleSystemShapeMultiModeValue.Loop, false, 0f, 0f, 1f, 0f, 0f, 100f); // Trail Settings PS.ParticleTrailSettings(false, ParticleSystemTrailTextureMode.Stretch, 2, true, true); // Collision Settings PS.ParticleCollisionSettings(false, 0, 0f, ParticleSystemCollisionMode.Collision3D, ParticleSystemCollisionQuality.High, ParticleSystemCollisionType.World, true, true, Layers); // Noise Settings PS.ParticleNoiseSettings(false, 6, 6, 6); // Light Settings PS.ParticleLightSettings(false, 1, EmissionCurve, "Point light"); // Sub Particle Settings SPS = SubObject.GetComponent <ParticleSystem>(); selectParticleEffects(SubObject, MoveData.MoveTypes.Rock, MoveData.MoveBehaviorsGeneric.Ball); //SPSCurve = new AnimationCurve(); //SPSCurve.AddKey(0f, 10f); //Bursts = new ParticleSystem.Burst[] //{ // new ParticleSystem.Burst(1f,1,1,1f) //}; //SPS.ParticleEmissionSettings(true, 1f, false, true, Bursts); //SPS.ParticleMainSettings(true, 2f, 1f, 0f, 2f, 3f); //SPS.ParticleNoiseSettings(true, 10, 15f, 10); //SPS.ParticleShapeSettings(true, ParticleSystemShapeType.Circle, ParticleSystemShapeMultiModeValue.Loop, false, 0f, 0f, 5f); //SPS.ParticleTrailSettings(true, ParticleSystemTrailTextureMode.Stretch, 2f, false, false); //SPS.ParticleRendererSettings(true, "Capsule", "nomat", "BLT", ParticleSystemRenderMode.Stretch); PS.ParticleSubSettings(true, SubObject); //// Rotation Settings PS.ParticleRotationSettings(true, 1, 0f, ParticleSystemCurveMode.TwoConstants); //// Renderer settings PS.ParticleRendererSettings(true, "Capsule", "Smoke", "nomat", ParticleSystemRenderMode.HorizontalBillboard); break; default: break; } }
void Start() { MoveSelectionMax = MoveSelection.Count; MoveSelectionCount = MoveSelectionMax; CurrentMove = MoveSelection[MoveSelectionCount]; }