Ejemplo n.º 1
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();
 }
Ejemplo n.º 2
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();
    }