Exemplo n.º 1
0
        public void RestartGame()
        {
            GameManager.TimeLeft = 75;
            Time.timeScale       = 1;
            WinLoseUI.SetActive(false);
            StartedGame            = true;
            GameManager.GameActive = true;
            SettingsUI.SetActive(false);
            Man.ResetValues();
            Wolf.ResetValues();
            Jinn.ResetValues();

            for (int i = 0; i < colliderTimers.Length; i++)
            {
                colliderTimers[i].CurrentCD = 0;
            }
            for (int i = 0; i < GameManager.HouseObjects.Count; i++)
            {
                GameManager.HouseObjects[i].CurrentCD = 0;
            }
            for (int i = 0; i < AudioManager.audioSources.Count; i++)
            {
                AudioManager.audioSources[i].Stop();
            }

            ChangeLanguage(language);
        }
Exemplo n.º 2
0
    void Awake()
    {
        constructTowerMenu = constructTowerMenuPublic;
        turretDetailMenu   = turretDetailMenuPublic;
        currencyUI         = currencyUIPublic;
        messageUI          = messageUIPublic;
        livesUI            = livesUIPublic;
        winLoseUI          = winLoseUIPublic;

        menus = new Menu[] { constructTowerMenu, turretDetailMenu };
    }
Exemplo n.º 3
0
        //public LayerMask JinnLayerMask;
        void Start()
        {
            // Debug.Log(JinnLayerMask.value);
            MainCam = GetComponent <Camera>();
            Application.targetFrameRate = 60;
            int minutes = (int)(GameManager.TimeLeft / 60);

            Timer.text = (language == (int)Language.Arabic ? "ﻲﻘﺒﺘﻣ ﻦﻣﺯ " : "Time Left ") + minutes + ":" + (GameManager.TimeLeft - minutes * 60).ToString("00");
            switcher   = GetComponent <LanguageSwitcher>();
            switcher.Initilize();
            GameManager.Init(MainCam, Jinn, Man, Wolf, ObjectsParent, FearImage, WinLoseText, WinLoseUI);
            ParticleManager.Initilaize(ParticleParent);
            AudioManager.Initilaize(AudioParent, audioMixer);
            ChangeLanguage(language);
            SettingsUI.SetActive(true);
            WinLoseUI.SetActive(false);
        }