void Start()
 {
     //GUI.matrix = Matrix4x4.Scale(new Vector3(Screen.width/500f,Screen.height/400f,1f));
     pm     = new PersianMaker();
     str[0] = pm.ToPersian1("نام");
     str[1] = pm.ToPersian1("امتیاز");
     str[2] = pm.ToPersian1("رتبه");
 }
示例#2
0
 void OnGUI()
 {
     GUI.skin   = persianskin;
     GUI.matrix = Matrix4x4.Scale(new Vector3(Screen.width / normalSW, Screen.height / normalSH, 1f));
     GUI.Label(new Rect(50f, 20f, 130f, 20f), pm.ToPersian1("نام کاربری"));
     username1 = GUI.TextField(new Rect(50f, 40, 130, 20), pm.ToPersian1(username1));
     if (GUI.Button(new Rect(50f, 70f, 130f, 40), login_btn))
     {
         if (username1.Length > 3)
         {
             Application.LoadLevel(1);
         }
         else
         {
             StartCoroutine(alert());
         }
     }
 }
示例#3
0
    // Update is called once per frame
    void Update()
    {
        do_entry();
        this.guiText.text = pm.ToPersian1("نام شما : " + kBoardString);


        if (kBoardString.Length >= 3 && kBoardString.Length <= 20)
        {
            login.SetActive(true);
        }
        else
        {
            login.SetActive(false);
        }

        if (Input.GetMouseButtonDown(0))
        {
            hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
            if (hit.collider != null)
            {
                if (hit.transform.tag == "name")
                {
                    iskBoardOpen = false;
                    keyboard     = TouchScreenKeyboard.Open(kBoardString, TouchScreenKeyboardType.NamePhonePad, false, false, false, false, ("نام خود را وارد کنید"));
                }
                else if (hit.transform.tag == "enterbtn")
                {
                    entry.username        = pm.ToPersian1(kBoardString);
                    entry.buffer_username = (kBoardString);

                    //entry.buffer_username =("جواد عرشیان");
                    //entry.username =pm.ToPersian1("جواد عرشیان");

                    PlayerPrefs.SetString("Player name", pm.ToPersian1(kBoardString));
                    PlayerPrefs.SetString("Player name buffer", (kBoardString));
                    Application.LoadLevel(1);
                }
            }
        }
    }
示例#4
0
    void Start()
    {
        levelNo          = 1;
        _default_pishool = (Vector3)GameObject.FindGameObjectWithTag("pishool").transform.position;
        _pishool         = (Transform)GameObject.FindGameObjectWithTag("pishool").transform;
        pause_btn.SetActive(false);

        foreach (GUIText chosentext in FindObjectsOfType(typeof(GUIText)) as GUIText[])
        {
            chosentext.fontSize = Mathf.FloorToInt(Screen.height * 0.05f);
        }
        QualitySettings.vSyncCount = 0;
        power.enabled       = false;
        pm                  = new PersianMaker();
        power_text.text     = pm.ToPersian1("انرژی");
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
    }
 ///Our Error function
 void Error()
 {
     guiText.enabled  = true;
     guiText.text     = pm.ToPersian1("خطا در برقراری ارتباط با سرور");
     guiText.fontSize = (int)(guiText.fontSize * 0.6f);
 }
示例#6
0
 // Use this for initialization
 void Start()
 {
     //TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, true, true);
     pm        = new PersianMaker();
     login_btn = pm.ToPersian1("ورود");
 }