void Dissolve(WellControl well) { foreach (GameObject g in this.inner) { try { well.AddBlock( Mathf.FloorToInt(this.transform.position.x + g.transform.localPosition.x), Mathf.FloorToInt(this.transform.position.y + g.transform.localPosition.y) ); //well.Well[Mathf.FloorToInt(this.transform.position.x + g.transform.localPosition.x), Mathf.FloorToInt(this.transform.position.y + g.transform.localPosition.y)] = 1; } catch (IndexOutOfRangeException) { //GameOver! } } well.WhenDropped(); GameObject.Destroy(this.gameObject); BlockControl.Instance.CurrentBlock = BlockControl.Instance.NextBlock().GetComponent <BlockBehaviour>(); }