private void OnTriggerEnter2D(Collider2D collision) { GameObject square = collision.gameObject; bool bad = square.GetComponent <SquareProperties>().bad; if (bad) { if (!GameMaster.invincible) { GameMaster.Lose(); } } else { Destroy(square); GameMaster.AddToScore(10); this.transform.localScale += new Vector3(growthPerSquare, growthPerSquare, growthPerSquare); GameMaster.AddToSpeed(speedPerSquare); } }