void Update() { // If special block position.y is lesser than BlockRemover position.y, destroy special block. if (GameObject.Find("BlockRemover").transform.localPosition.y >= this.transform.localPosition.y) { GenerateBlocks.Remove_Block(this.gameObject); } }
void OnTriggerEnter2D(Collider2D col) { // Send the gameobject for destroy. GenerateBlocks.Remove_Block(col.gameObject); }