Exemplo n.º 1
0
        // Displays Stats window on UI
        private void toggleStats()
        {
            preventUIOverlap();                                     //Hiding other menus in order to avoid them overlapping

            if (Stats.activeSelf == false)
            {
                statsText.text = StatKeeper.getStats();
                Stats.SetActive(true);
            }
            else
            {
                Stats.SetActive(false);
            }
        }
Exemplo n.º 2
0
        //displays Minimap window on UI
        private void toggleMap()                    //Method for showing/hiding minimap of the current scene
        {
            Debug.Log("Map toggle");
            preventUIOverlap();             //Hiding other menus in order to avoid them overlapping

            if (Map.activeSelf == true)
            {
                Map.SetActive(false);
                statsText.text = StatKeeper.getStats();
            }
            else
            {
                Map.SetActive(true);
            }
        }
Exemplo n.º 3
0
 private void UpdateStats()
 {
     statsText.text = StatKeeper.getStats();
 }