This commit is contained in:
SoulliesOfficial
2025-12-17 04:19:38 -05:00
parent 7c1cb7e8e1
commit d15957c719
4315 changed files with 8260710 additions and 2940 deletions

View File

@@ -0,0 +1,41 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MSFEffectExample : MonoBehaviour
{
public MSFEffectsGroup group;
public int CurIndex = 0;
public ParticleSystem CurParticle;
private void Update()
{
if(Input.GetKeyDown(KeyCode.A))
{
CurIndex -= 1;
}
if(Input.GetKeyDown(KeyCode.D))
{
CurIndex += 1;
}
if(CurIndex >= group.Particles.Count)
{
CurIndex = 0;
}
if(CurIndex < 0)
{
CurIndex = group.Particles.Count - 1;
}
if(Input.GetKeyDown(KeyCode.Space)|| (Input.GetMouseButtonDown(0)))
{
PlayEffects();
}
}
public void PlayEffects()
{
if(CurParticle!=null)
{
Destroy(CurParticle.gameObject);
}
CurParticle = Instantiate(group.Particles[CurIndex]);
}
}