private BlockView FindBlock(int id) { BlockView res = null; foreach (Transform child in transform) { var view = child.GetComponent <BlockView>(); if (view != null) { if (view.id == id) { res = view; break; } } } return(res); }
private void OnCollision(BlockView view) { levelProxy.HitBlock(view.id); }