void showStateImage(GameObject thePlayer) { playerStar thePlayerStar = thePlayer.GetComponent <playerStar> (); UIStateShowImage BB = theStateImageB.GetComponent <UIStateShowImage> (); BB.makeClear(); BB.makeDrawing(thePlayerStar.theValues, thePlayerStar.theTitles); UIStateShowImage FF = theStateImageF.GetComponent <UIStateShowImage> (); FF.makeClear(); FF.makeDrawing(thePlayerStar.theValues, thePlayerStar.theTitles); // UIStateShowImage [] theImagesFrState = theStateImage.GetComponentsInChildren<UIStateShowImage> (); // if (thePlayer) // { // playerStar thePlayerStar = thePlayer.GetComponent <playerStar> (); // if (thePlayerStar) // { // foreach (UIStateShowImage S in theImagesFrState) // { // S.makeClear (); // S.makeDrawing (thePlayerStar.theValues, thePlayerStar.theTitles); // } // } // } // else // { // // foreach (UIStateShowImage S in theImagesFrState) // { // S.makeClear (); // S.makeDrawing (new List<float> (), new List<string> ()); // } // } }
private void makeStateImage() { if (therPlayer) { playerStar thePlayerStar = therPlayer.GetComponent <playerStar> (); if (thePlayerStar) { foreach (UIStateShowImage S in theImagesFrState) { S.makeClear(); S.makeDrawing(thePlayerStar.theValues, thePlayerStar.theTitles); } } } else { foreach (UIStateShowImage S in theImagesFrState) { S.makeClear(); S.makeDrawing(new List <float> (), new List <string> ()); } } }