Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        distToPlayer = Vector3.Distance(this.transform.position, Player.transform.position); //distance to Player

        InteractPressed();
        QTEEvents();

        if (NumOfEvents == 10 && QTECanvas.GetComponent <Canvas>().enabled == true) //If the max number of QTEs is reached, disable canvas
        {
            interactComplete = true;
            checkPlayerPrevent(false);
            TaskStrike.SetActive(true);
            PlayerSlider.value = PlayerSlider.value + 1;
            QTECanvas.GetComponent <Canvas>().enabled = false;
            SoundManager.PlaySound("Point");
            TerminalIcon.SetActive(false);
        }

        if (distToPlayer <= MaxDist && StartQTE == false)
        {
            playerPrompt.GetComponent <Text>().text = "Press Square";
        }
        else
        {
            playerPrompt.GetComponent <Text>().text = " ";
        }
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     QTECanvas.GetComponent <Canvas>().enabled = false;
     XB.GetComponent <Image>().enabled         = false;
     Circle.GetComponent <Image>().enabled     = false;
     Triangle.GetComponent <Image>().enabled   = false;
     Square.GetComponent <Image>().enabled     = false;
     playerPrompt.GetComponent <Text>().text   = " ";
     TaskStrike.SetActive(false);
     TerminalIcon.SetActive(true);
 }