Example #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);
        }
Example #2
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);
        }