public void Break() { ScoreSysteme.GetInstance().AddScore(10); GameObject instancePart = Instantiate(_breakParticles, transform.position, Quaternion.identity); instancePart.GetComponent <ParticleSystem>().startColor = GetComponentInChildren <SpriteRenderer>().color; Destroy(gameObject); }
// Start is called before the first frame update void Start() { instance = this; RefreshScore(); }