File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,15 @@ public static void OnShowEndScreen()
1414 {
1515 if ( SelfRevive . gameoverUI == null )
1616 {
17- SelfRevive . gameoverUI = GameObject . Find ( "UI (1)/GameoverUi" ) . gameObject ;
17+ SelfRevive . gameoverUI = GameObject . Find ( "UI (1)/GameoverUi/Overlay/Header" ) ;
1818 GameObject menuButton = SelfRevive . gameoverUI . transform . Find ( "MenuButton" ) . gameObject ;
1919 GameObject reviveButton = Object . Instantiate ( menuButton , SelfRevive . gameoverUI . transform ) ;
20- menuButton . transform . position = new Vector3 ( menuButton . transform . position . x + 400 , menuButton . transform . position . y , menuButton . transform . position . z ) ;
21- reviveButton . transform . position = new Vector3 ( reviveButton . transform . position . x - 400 , reviveButton . transform . position . y , reviveButton . transform . position . z ) ;
20+ reviveButton . transform . position = new Vector3 ( reviveButton . transform . position . x + 160 , reviveButton . transform . position . y , reviveButton . transform . position . z ) ;
2221 reviveButton . GetComponent < Button > ( ) . onClick = new Button . ButtonClickedEvent ( ) ;
2322 reviveButton . GetComponent < Button > ( ) . onClick . AddListener ( ( ) => SelfRevive . Revive ( ) ) ;
24- reviveButton . transform . Find ( "RawImage" ) . GetComponentInChildren < TMP_Text > ( ) . text = "Revive" ;
23+ TMP_Text text = reviveButton . transform . Find ( "RawImage" ) . GetComponentInChildren < TMP_Text > ( ) ;
24+ text . autoSizeTextContainer = true ;
25+ text . text = "Revive" ;
2526 }
2627 }
2728 }
You can’t perform that action at this time.
0 commit comments