private void Start()
    {
        StartCoroutine(Flow());
        CursorLockManager.ReleaseMouse(this);
        RenderSettings.fog     = false;
        TimerController.Faild += () => { StartCoroutine(WhenHeFailsBigTime()); };

        RandomProblem         = Random.Range(0, ProblemsTriggers.Count);
        CurrentProblemTrigger = Instantiate(ProblemsTriggers[RandomProblem].ProblemTrigger).gameObject;
        ProblemsTriggers[RandomProblem].ProblemParticleSystem.Play();
        FixedProblem = false;
    }
 public override void StartGame()
 {
     CursorLockManager.UseMouse(this);
     TimeStarted = Time.time;
     for (int y = 0; y < 3; y++)
     {
         for (int x = 0; x < 3; x++)
         {
             Fires[x, y] = Instantiate(FirePrefab, FiredGrid).GetComponent <WhackAFireFire>();
             Fires[x, y].SetReferences(BigFire, MediumFire, SmallFire, this);
         }
     }
 }
    public override void EndGame()
    {
        GameManger.Instance.ProblemsTriggers[GameManger.Instance.RandomProblem].ProblemParticleSystem.Stop();
        GameManger.Instance.TimerController.StopCoroutine(GameManger.Instance.TimerController.ClocksTicking());
        GameManger.Instance.FixedProblem = true;
        GameManger.Instance.ProblemFixedTextShower();
        GameManger.Instance.TimerController.StopTimer();

        GameManger.Instance.CurrentProblemTrigger.gameObject.SetActive(false);

        MinigameStarted = false;
        GameManger.Instance.CashManager.AddMoney((int)(GameManger.Instance.TimerController.TimePassed * 100));
        Destroy(gameObject);
        CursorLockManager.ReleaseMouse(this);
        base.EndGame();
    }
 void Start()
 {
     instance = this;
     UnlockCursor();
 }
Example #5
0
 private void Start()
 {
     StartGame();
     CursorLockManager.UseMouse(this);
 }
Example #6
0
 public override void StartGame()
 {
     CursorLockManager.UseMouse(this);
 }