public void DestroyBlock() { AM.PlaySound(sndDestroy); lc.BlockDestroyed(); gamemanager.AddScore(points); Destroy(gameObject); Instantiate(pickupPrefab, transform.position, Quaternion.identity); Instantiate(particleEffectPrefab, transform.position, Quaternion.identity); Exsplode(); }
// Start is called before the first frame update void ApplyEffect() { Gamemanager gM = FindObjectOfType <Gamemanager>(); gM.AddScore(point); }