Exemplo n.º 1
0
        public void Break()
        {
            BeforeBreak?.Invoke();

            IBreakable breakable;

            for (int i = 0; i < blocks.Count; i++)
            {
                breakable = blocks[i].breakable;

                breakable.Break();
            }

            OnBreak?.Invoke();
        }
Exemplo n.º 2
0
        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();
        }