Ejemplo n.º 1
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num1", "Get the antidote.");
            ninja.CreateObjective("Num2", "Find the another way into the hospital.");

            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 2
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num8", "Climb the rocks.");
            ninja.CompleteObjective("Num7");

            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 3
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num5", "Get to the cafeteria's janitor closet.");
            ninja.CompleteObjective("Num4");

            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 4
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num6", "Explore the subway.");
            ninja.CompleteObjective("Num5");

            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 5
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num7", "Ride on the cart.");
            ninja.CompleteObjective("Num6");

            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 6
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num4", "Get across the acid water.");
            ninja.CompleteObjective("Num1");
            ninja.CompleteObjective("Num3");


            Destroy(this.gameObject);
        }
    }
Ejemplo n.º 7
0
    // Update is called once per frame
    void Update()
    {
        if (GameObject.Find("TileCollector").GetComponent <TileCollector>().AllCollected /*&& dummy == true*/)
        {
            dummy++;
            print("it went through");
        }

        if (dummy == 1)
        {
            stepOnThis = "Yellow";
            print("This one also went through");
            ninja.CreateObjective("DDR22", "Use the machine to open the exit");
        }
        //Changing the color of the screen

        if (stepOnThis == "Red" || stepOnThis == "Red2" || stepOnThis == "Red3")
        {
            Screen.GetComponent <Renderer>().material.color = Color.red;
        }

        if (stepOnThis == "Green" || stepOnThis == "Green2")
        {
            Screen.GetComponent <Renderer>().material.color = Color.green;
        }

        if (stepOnThis == "Blue" || stepOnThis == "Blue2" || stepOnThis == "Blue3")
        {
            Screen.GetComponent <Renderer>().material.color = Color.blue;
        }

        if (stepOnThis == "Yellow" || stepOnThis == "Yellow2")
        {
            Screen.GetComponent <Renderer>().material.color = Color.yellow;
        }

        if (stepOnThis == "End")
        {
            Screen.GetComponent <Renderer>().material.color = Color.black;
        }



        //Checking what color to change to and what step you're on
        //R,G,B,R,Y
        //Y,B,R,G,R2,Y2,B2,R3,B3,G2

        if (stepOnThis == "Yellow" && yellowOn == true)
        {
            stepNum++;
            stepOnThis = "Blue";
            print(stepNum);
        }

        if (stepOnThis == "Blue" && blueOn == true)
        {
            stepNum++;
            stepOnThis = "Red";
            print(stepNum);
        }

        if (stepOnThis == "Red" && redOn == true)
        {
            stepNum++;
            stepOnThis = "Green";
            print(stepNum);
        }

        if (stepOnThis == "Green" && greenOn == true)
        {
            stepNum++;
            stepOnThis = "Red2";
            print(stepNum);
        }

        if (stepOnThis == "Red2" && redOn == true)
        {
            stepNum++;
            stepOnThis = "Yellow2";
            print(stepNum);
        }

        if (stepOnThis == "Yellow2" && yellowOn == true)
        {
            stepNum++;
            stepOnThis = "Blue2";
            print(stepNum);
        }

        if (stepOnThis == "Blue2" && blueOn == true)
        {
            stepNum++;
            stepOnThis = "Red3";
            print(stepNum);
        }

        if (stepOnThis == "Red3" && redOn == true)
        {
            stepNum++;
            stepOnThis = "Blue3";
            print(stepNum);
        }

        if (stepOnThis == "Blue3" && blueOn == true)
        {
            stepNum++;
            stepOnThis = "Green2";
            print(stepNum);
        }

        if (stepOnThis == "Green2" && greenOn == true)
        {
            stepNum++;
            stepOnThis = "End";
            print(stepNum);
        }

        if (stepOnThis == "End" && stepNum == 10)
        {
            DDR2Done = true;
            //print("End works");
            dummy2 += Time.deltaTime;
        }

        if (dummy2 == 1f)
        {
            ninja.CompleteObjective("DDR22");
            //dummy2 = 10f;
        }

        if (DDR2Done == true && dummy3 == true)
        {
            ThatsMyJam.Play();
            dummy3 = false;
        }
    }