// Use this for initialization void OnTriggerEnter2D(Collider2D collider) { if (collider.tag == "weapon") { Score1.AddPoint(); Destroy(collider.gameObject); //gameObject.SetActive(false); } }
void Start() { Score1.AddPoint(); Score = PlayerPrefs.GetInt("Score", Score); highScore = PlayerPrefs.GetInt("highScore", 0); }