void CheckHP()
    {
        P1.SetActive(true);
        P2.SetActive(true);
        P3.SetActive(true);
        P4.SetActive(true);

        if (CurrHP <= 3)
        {
            P4.SetActive(false);
        }

        if (CurrHP <= 2)
        {
            P3.SetActive(false);
        }

        if (CurrHP <= 1)
        {
            P2.SetActive(false);
        }

        if (CurrHP <= 0)
        {
            P1.SetActive(false);
        }
    }
Пример #2
0
    public void activation()
    {
        QnsCall();
        ReadEntries();
        LogGameItems();

        //Player two's turn
        if (x1 == false)
        {
            O1.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            O1.SetActive(false);
            O2.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            O2.SetActive(false);
            O3.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            O3.SetActive(false);
            O4.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            O4.SetActive(false);
            T1.SetActive(false);
            HideOptBox1();

            P1.SetActive(true);
            P2.SetActive(true);
            P3.SetActive(true);
            P4.SetActive(true);
            T2.SetActive(true);
            ShowOptBox2();
            tr2.resetClock2();

            optionTxt2();
            x1 = true;
        }

        //Player one's turn
        else
        {
            P1.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            P1.SetActive(false);
            P2.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            P2.SetActive(false);
            P3.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            P3.SetActive(false);
            P4.GetComponent <CanvasGroup> ().blocksRaycasts = true;
            P4.SetActive(false);
            T2.SetActive(false);
            HideOptBox2();


            O1.SetActive(true);
            O2.SetActive(true);
            O3.SetActive(true);
            O4.SetActive(true);
            T1.SetActive(true);
            ShowOptBox1();
            tr1.resetClock1();

            optionTxt1();
            x1 = false;
        }
    }
Пример #3
0
 void OnCollisionStay(Collision collisionInfo)
 {
     if (collisionInfo.gameObject.tag == "Player")
     {
         //turns on correct path. didn't know a better way to go about this
         P1.SetActive(true);
         P2.SetActive(true);
         P3.SetActive(true);
         P4.SetActive(true);
         P5.SetActive(true);
         P6.SetActive(true);
         P7.SetActive(true);
     }
 }
Пример #4
0
    void OnCollisionStay(Collision collisionInfo)
    {
        if (collisionInfo.gameObject.tag == "Player")
        {
            //instructions for interact
            fireText.gameObject.SetActive(true);
            //turns off
            if (Input.GetKey(KeyCode.E))
            {
                this.gameObject.SetActive(false);
                fireText.gameObject.SetActive(false);

                //gross but can't think of a better way right now
                //activates lit up platforms
                P1.SetActive(true);
                P2.SetActive(true);
                P3.SetActive(true);
                P4.SetActive(true);
                P5.SetActive(true);
                P6.SetActive(true);
            }
        }
    }