HeavenStudioPlus/Assets/Scripts/Util/ParticleSystemHelpers.cs

38 lines
1.4 KiB
C#
Raw Normal View History

See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
using UnityEngine;
namespace HeavenStudio.Util
{
public static class ParticleSystemHelpers
{
public static void PlayScaledAsync(this ParticleSystem particleSystem, float timeScale, bool respectDistance = false)
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
SetAsyncScaling(particleSystem, timeScale, respectDistance);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
particleSystem.Play();
}
public static void SetAsyncScaling(this ParticleSystem particleSystem, float timeScale, bool respectDistance = false)
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
ParticleSystem.MainModule main = particleSystem.main;
LumBEARjack (#734) * Heh * prefab cat * minigame script + sounds imported * more catgrab * oops * functional objects non visual * More cat ghrab 2 * persist/stretchy logs + cue disable sound + sigh * finished cat grab * sdfsdfsdf * oops * Oops. * Freedom * More * more anime * anims almost dune * all anims * Oops. * Fixing bad animation * I have made a severe and continuous lapse in judgement * bear bop + cut + whiff visuals implemented * rest visuals implemented * added log visuals cut * accomadation for persist/stretch * Oops345 * CATS! * sorting layer oops * fix catgrab object being flipped * bug fix and huh choice * sorting layer fix * anim fixes * upscale almost * upscale done * Huge zoom in * left cat put * two main cats done * particles for main logs * Particles implemented * particle tweaks * bg cats placed * bg cats + zoom toggle * slide offset * more bg cat * new object sheet * bg cats final * more particle * particles fr * Oops * catdance update * I have created an Issue * fixed a lot of shit * Paricle fix * particle fix again im sorry * object upscale wip and more * Mistakes * freezer particle and tweaks * resorted * more particle nonsense im sorry everything hurts * freezer break implement * penguin fix * sorry * halves + upscales done + particles done * fixed particles * particle fixes 2000 * fixed cat dance and rest * snow * icon * oops232323 * Sigh * snow implementation * baby done * layering fix * actual layering fix * particle tweaks * windsnowshit * new rotation * rotation pivots set * all particles should be good now * bat fix * bg cats work better * miss implemented * layer arm fix * rotation changed * expose camera ease + spam prevention * it was just 1 beat long * custom objects * custom objects initial implementation * bomb + ball fix * new sounds * oops * More * big ball implementation 2 * Oops. * Update LBJCatMove.cs --------- Co-authored-by: ev <85412919+iloveoatmeal2022@users.noreply.github.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2024-03-04 03:50:39 +00:00
main.simulationSpeed = main.simulationSpeed / Conductor.instance.pitchedSecPerBeat * timeScale;
// addition by Yin
if (respectDistance)
{
ParticleSystem.EmissionModule emission = particleSystem.emission;
emission.rateOverDistanceMultiplier = Conductor.instance.pitchedSecPerBeat * timeScale * 4; // i don't know why 4 is the magic number
}
LumBEARjack (#734) * Heh * prefab cat * minigame script + sounds imported * more catgrab * oops * functional objects non visual * More cat ghrab 2 * persist/stretchy logs + cue disable sound + sigh * finished cat grab * sdfsdfsdf * oops * Oops. * Freedom * More * more anime * anims almost dune * all anims * Oops. * Fixing bad animation * I have made a severe and continuous lapse in judgement * bear bop + cut + whiff visuals implemented * rest visuals implemented * added log visuals cut * accomadation for persist/stretch * Oops345 * CATS! * sorting layer oops * fix catgrab object being flipped * bug fix and huh choice * sorting layer fix * anim fixes * upscale almost * upscale done * Huge zoom in * left cat put * two main cats done * particles for main logs * Particles implemented * particle tweaks * bg cats placed * bg cats + zoom toggle * slide offset * more bg cat * new object sheet * bg cats final * more particle * particles fr * Oops * catdance update * I have created an Issue * fixed a lot of shit * Paricle fix * particle fix again im sorry * object upscale wip and more * Mistakes * freezer particle and tweaks * resorted * more particle nonsense im sorry everything hurts * freezer break implement * penguin fix * sorry * halves + upscales done + particles done * fixed particles * particle fixes 2000 * fixed cat dance and rest * snow * icon * oops232323 * Sigh * snow implementation * baby done * layering fix * actual layering fix * particle tweaks * windsnowshit * new rotation * rotation pivots set * all particles should be good now * bat fix * bg cats work better * miss implemented * layer arm fix * rotation changed * expose camera ease + spam prevention * it was just 1 beat long * custom objects * custom objects initial implementation * bomb + ball fix * new sounds * oops * More * big ball implementation 2 * Oops. * Update LBJCatMove.cs --------- Co-authored-by: ev <85412919+iloveoatmeal2022@users.noreply.github.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2024-03-04 03:50:39 +00:00
}
public static void PlayScaledAsyncAllChildren(this ParticleSystem particleSystem, float timeScale)
{
particleSystem.PlayScaledAsync(timeScale);
foreach (var p in particleSystem.GetComponentsInChildren<ParticleSystem>())
{
if (p == particleSystem) continue;
p.PlayScaledAsyncAllChildren(timeScale);
}
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
}
}
}