void makeHitNums() { for (int i = 0; i < maxBodyCount * 2; i++) { GameObject hn = (GameObject)Instantiate(hitNumRef, transform.position, Quaternion.identity); hn.GetComponent <MeshRenderer>().sortingLayerName = "UI"; HitNumClass hnc = new HitNumClass(hn, hn.transform, hn.GetComponent <TextMesh>()); hitNums.Add(hnc); } }
void makeHitNums() { for( int i = 0; i < maxBodyCount*2;i++) { GameObject hn = (GameObject)Instantiate(hitNumRef, transform.position, Quaternion.identity); hn.GetComponent<MeshRenderer>().sortingLayerName = "UI"; HitNumClass hnc = new HitNumClass(hn,hn.transform,hn.GetComponent<TextMesh>()); hitNums.Add(hnc); } }