Nextrek
Diff Revisions
126
vs
127
for /3DSpace/Assets/Custum/Scripts/DrawRect.cs
|
@@ -228,8 +228,18 @@ |
228 |
228 |
|
|
229 |
229 |
|
float tmp = Vector3.Distance(_transform.position,_spaceShip.position); |
230 |
230 |
|
int dis = (int)tmp; |
231 |
|
- |
string str = dis+"km"; |
|
231 |
+ |
|
|
232 |
+ |
string str = dis+"mt"; |
|
233 |
+ |
|
|
234 |
+ |
PilotNameGenerator cmp = this.gameObject.GetComponent<PilotNameGenerator>(); |
|
235 |
+ |
if (cmp != null) |
|
236 |
+ |
{ |
|
237 |
+ |
str=cmp.getPilotName()+"\n"+str; |
|
238 |
+ |
} |
|
239 |
+ |
|
232 |
240 |
|
GUI.skin.label.normal.textColor=col; |
|
241 |
+ |
GUI.skin.label.alignment = TextAnchor.MiddleCenter; |
|
242 |
+ |
|
233 |
243 |
|
Vector2 sz = GUI.skin.label.CalcSize(new GUIContent(str)); |
234 |
244 |
|
|
235 |
245 |
|
GUI.Label(new Rect(x-sz.x/2,Screen.height-y,sz.x,sz.y),str); |