Exemplo n.º 1
0
            public static void InitializeTheGame()
            {
                // DEBUG :
                NameOfThePlayer = "Akuumy";

                Lang.DefineLanguage(System.IO.Directory.GetFiles(".", "lang.fr.xml", System.IO.SearchOption.AllDirectories)[0], "French");
            }
Exemplo n.º 2
0
    private string _ui_currenthp;                // HP translated

    #endregion

    #region METHODS

    private void Awake()
    {
        // DEBUG:
        Lang.DefineLanguage(System.IO.Directory.GetFiles(".", "lang.fr.xml", System.IO.SearchOption.AllDirectories)[0], "French");

        _txtHealthValue = GameObject.Find("txtHealthValue").GetComponent <UnityEngine.UI.Text>();
        _ui_currenthp   = Lang.GetString("ui.currenthp");
    }
Exemplo n.º 3
0
    // TODO: Ajouter toutes les autres vérifications et initialisations
    private void Awake()
    {
            // Language

        string[] s = System.IO.Directory.GetFiles(".", "lang.fr.xml", System.IO.SearchOption.AllDirectories);
        Lang.DefineLanguage(s[0], Application.systemLanguage.ToString());

            // Init all texts

        mainMenuTexts[0].text = Lang.GetString("mainmenu.startbutton");
    }
Exemplo n.º 4
0
    private UnityEngine.UI.Text _txtCanPerformAnAction; // Le texte des actions que le joueur peut faire

    #endregion

    #region METHODS

    private void Awake()
    {
        // DEBUG:
        Lang.DefineLanguage(System.IO.Directory.GetFiles(".", "lang.fr.xml", System.IO.SearchOption.AllDirectories)[0], "French");

        // Init

        _rb = GetComponent <Rigidbody>();

        screenPosForRayCast = Camera.main.WorldToScreenPoint(gameObject.transform.position);

        _txtCanPerformAnAction = GameObject.Find("txtCanPerformAnAction").GetComponent <UnityEngine.UI.Text>();
    }
Exemplo n.º 5
0
    void Awake()
    {
        // DEBUG: Initialize stats
        #if UNITY_EDITOR
        Lang.DefineLanguage(System.IO.Directory.GetFiles(".", "lang.fr.xml", System.IO.SearchOption.AllDirectories)[0], "French");
        InitPlayerStats.NewGameInitStats(100);
        #endif

        Hunger = 100;
        Thirst = 100;

        _pnlCurrentBuffs = GameObject.Find("pnlCurrentBuffs");

        _txtHungerValue = GameObject.Find("txtHungerValue").GetComponent <Text>();
        _txtThirstValue = GameObject.Find("txtThirstValue").GetComponent <Text>();
        GameObject.Find("txtHealthValue").GetComponent <Text>().text = CurrentHP + "/" + MaxHP + " " + Lang.GetString("ui.currenthp");

        InvokeRepeating("LoweringHunger", 0, 2);
        InvokeRepeating("LoweringThirst", 0, 1);
    }