Hi, i am still new to unity3d and to coding it self. I am trying to make a game like flappy bird and a friend of mine gave me a script he found from the web for the player (the bird) buut when you loose the text is too big on the screen. I can not see where to change that in the code so can you guys help me. I would really apreciate it if you change the code for me The text i want to make a smaller font size is "Your score " “repeat” “yes” “exit”. Here is the code:
using UnityEngine;
using System.Collections;
public class player : MonoBehaviour {
public Transform skor;
private int score=0;
private bool GuiOn=false,bisa=true;
public GUIStyle template;
void Update () {
if (bisa)
{
skor.guiText.text = score.ToString ();
if (Input.GetMouseButtonDown (0)) {
rigidbody2D.isKinematic = true;
rigidbody2D.isKinematic = false;
//rigidbody2D.WakeUp();
rigidbody2D.AddForce (transform.up * 280);
} else if (Input.GetKey (KeyCode.Escape)) {
UnityEngine.Application.Quit ();
}
for (var i = 0; i < Input.touchCount; ++i) {
if (Input.GetTouch (i).phase == TouchPhase.Began) {
rigidbody2D.isKinematic = true;
rigidbody2D.isKinematic = false;
//rigidbody2D.WakeUp();
rigidbody2D.AddForce (transform.up * 280);
}
}
}
}
void OnCollisionEnter2D (Collision2D col)
{
if (col.gameObject.tag == "hambatan") {
GuiOn=true;
}
}
void OnTriggerEnter2D( Collider2D col) {
if (col.gameObject.tag == "score")
{
Debug.Log("scoooooooooorrrrreeeeeee");
score+=1;
}else if (col.gameObject.tag == "hambatan") {
Debug.Log ("kedetekbawah");
GuiOn=true;
}
}
void OnGUI(){
if(GuiOn){
bisa=false;
rigidbody2D.isKinematic=true;
GUI.Box (new Rect (100,100,300,200), "ˢᶜᵒʳᵉ ⁻ "+score.ToString()+", ᴳᵃᵐᵉ ᴼᵛᵉʳ",template);
if (GUI.Button (new Rect (110,200,300,80), "ᴬᵍᵃᶦᶰ",template)) {
Application.LoadLevel(0);
}
if (GUI.Button (new Rect (110,300,300,80), "ᵉˣᶦᵗ",template)) {
Application.Quit();
}
}
}
}