예제 #1
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();
        }
예제 #2
0
 public void SetupGame()
 {
     GameState.SetValue(true);
     bgm.Play();
     startingBlocks.Setup();
     score.SetValue(0f);
     breakCount.SetValue(0);
     OnGameSetup?.Invoke();
 }
예제 #3
0
        public void Check()
        {
            int tempLvl = level.GetValue();
            int tempBrk = breakCount.GetValue();

            if (tempLvl < data.levels.Count)
            {
                int lvlUp = data.levels[tempLvl].breakCount;

                if (tempBrk >= lvlUp)
                {
                    IncreaseLevel();
                    sfx.Play();
                }
            }
        }