using System.Collections; using System.Collections.Generic; using UnityEngine; public class EffectActivator : MonoBehaviour { public ParticleSystem effect; private void Start() { ComWrapper.onCoinRemoved.AddListener(Activate); } public void Activate(int newCount) { effect.Emit(10); } }