Exemplo n.º 1
0
 private void Playing()
 {
     Time.timeScale = 1;
     LoseUI.SetActive(false);
     StartUI.SetActive(false);
     score.SetActive(true);
 }
Exemplo n.º 2
0
 void Start()
 {
     /*_stateMachines.Reset();
      * _stateMachines.RegisterHandler();*/
     _state         = States.Begin;
     Time.timeScale = 0;
     StartUI.SetActive(true);
     LoseUI.SetActive(false);
     score.SetActive(false);
 }
Exemplo n.º 3
0
 public void Activate()
 {
     currentLevel = Level.lvl1;
     allowInputs  = true;
     //countdownBar.maxValue = refillTime;
     currentState = State.Active;
     HUD.SetActive(true);
     StartUI.SetActive(false);
     Sun.gameObject.GetComponent <SunDawn>().SetActive();
     ambient.Play();
 }
Exemplo n.º 4
0
 public void SetContagious()
 {
     allowInputs = true;
     //countdownBar.maxValue = -10;
     countDown    = false;
     currentState = State.Contagious;
     HUD.SetActive(true);
     StartUI.SetActive(false);
     SickUI.SetActive(false);
     Sun.gameObject.GetComponent <SunDawn>().SetActive();
     TimeCounter.gameObject.GetComponent <TimedownCounter>().SendMessage("SetContinueTime");
     InfectionBar.SetActive(false);
     InfectionStatus.gameObject.GetComponent <Text>().text  = "COVID POSITIVO";
     InfectionStatus.gameObject.GetComponent <Text>().color = Color.red;
     playerSpeed = 3;
     ambient.Play();
 }
Exemplo n.º 5
0
    void Start()
    {
        //Set the max value to the refill time
        rb = GetComponent <Rigidbody>();
        if (currentLevelInt == 0)
        {
            threshold_money = 3000;
        }
        else if (currentLevelInt == 1)
        {
            print("LVL2!");
            threshold_money = 4000;
            StartUI.SetActive(false);
            HUD.SetActive(true);
            ambient.Play();
            TimeCounter.gameObject.GetComponent <TimedownCounter>().SendMessage("ChangeFlag");
            Sun.gameObject.GetComponent <SunDawn>().SetActive();

            if (contagiusBool)
            {
                currentState                = State.Contagious;
                threshold_money             = threshold_money + 500 * (currentLevelInt + 1);
                totalmoney.text             = threshold_money.ToString();
                VirusEmitter.enableEmission = true;
                VirusEmitter.Play();
                playerSpeed = 3;
                InfectionBar.SetActive(false);
                InfectionStatus.gameObject.GetComponent <Text>().text  = "COVID POSITIVO";
                InfectionStatus.gameObject.GetComponent <Text>().color = Color.red;
            }
            else
            {
                currentState = State.Active;
            }
        }
        else if (currentLevelInt == 2)
        {
            threshold_money = 5000;
            StartUI.SetActive(false);
            HUD.SetActive(true);
            allowInputs = true;
            ambient.Play();
            //TimeCounter.gameObject.GetComponent<TimedownCounter>().SendMessage("ChangeFlag");
            Sun.gameObject.GetComponent <SunDawn>().SetActive();
            if (contagiusBool)
            {
                currentState                = State.Contagious;
                threshold_money             = threshold_money + 500 * (currentLevelInt + 1);
                totalmoney.text             = threshold_money.ToString();
                VirusEmitter.enableEmission = true;
                VirusEmitter.Play();
                playerSpeed = 3;
                InfectionBar.SetActive(false);
                InfectionStatus.gameObject.GetComponent <Text>().text  = "COVID POSITIVO";
                InfectionStatus.gameObject.GetComponent <Text>().color = Color.red;
            }
            else
            {
                currentState = State.Active;
            }
        }
        totalmoney.text = threshold_money.ToString();
    }