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(); }
public void SetupGame() { GameState.SetValue(true); bgm.Play(); startingBlocks.Setup(); score.SetValue(0f); breakCount.SetValue(0); OnGameSetup?.Invoke(); }
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(); } } }