Exemple #1
0
    public void Break()
    {
        ScoreSysteme.GetInstance().AddScore(10);
        GameObject instancePart = Instantiate(_breakParticles, transform.position, Quaternion.identity);

        instancePart.GetComponent <ParticleSystem>().startColor = GetComponentInChildren <SpriteRenderer>().color;

        Destroy(gameObject);
    }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
     RefreshScore();
 }