public void Break() { BeforeBreak?.Invoke(); IBreakable breakable; for (int i = 0; i < blocks.Count; i++) { breakable = blocks[i].breakable; breakable.Break(); } OnBreak?.Invoke(); }
public void Break() { BeforeBreak?.Invoke(); ParticleSystem tempPs = Instantiate(ps); tempPs.transform.position = this.transform.position; tempPs.Play(); sfxSet.Play(); breakCount.ApplyChange(1); CameraShaker.Instance.ShakeOnce(Magnitude, Roughness, 0, FadeOutTime); OnBreak?.Invoke(); }