Пример #1
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);
        }
    }
Пример #2
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num8", "Climb the rocks.");
            ninja.CompleteObjective("Num7");

            Destroy(this.gameObject);
        }
    }
Пример #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);
        }
    }
Пример #4
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num6", "Explore the subway.");
            ninja.CompleteObjective("Num5");

            Destroy(this.gameObject);
        }
    }
Пример #5
0
    void OnTriggerEnter(Collider col)
    {
        if (col.tag == "Player")
        {
            ninja.CreateObjective("Num7", "Ride on the cart.");
            ninja.CompleteObjective("Num6");

            Destroy(this.gameObject);
        }
    }
Пример #6
0
    // Update is called once per frame
    void Update()
    {
        if (AllCollected == true)
        {
            dummy += Time.deltaTime;
            print("THIS TIME RIGHT HERE");
        }

        if (GreenIn == true && YellowIn == true && BlueIn == true)
        {
            AllCollected = true;
            ninja.RemoveObjective("Green");
            ninja.RemoveObjective("Yellow");
            ninja.RemoveObjective("Blue");
        }

        if (dummy >= 1f && OtherDummy == true)
        {
            ninja.CompleteObjective("Num5");
            print("THIS THING RIGHT HERE");
            OtherDummy = false;
        }
    }
Пример #7
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "Player")
     {
         ninja.CompleteObjective("Num8");
         ninja.RemoveObjective("Num1");
         ninja.RemoveObjective("Num2");
         ninja.RemoveObjective("Num3");
         ninja.RemoveObjective("Num4");
         ninja.RemoveObjective("Num5");
         ninja.RemoveObjective("Num6");
         ninja.RemoveObjective("Num7");
         ninja.RemoveObjective("Num8");
         Destroy(this.gameObject);
     }
 }
Пример #8
0
    // Update is called once per frame
    void Update()
    {
        open = doorAnim.GetBool("open");

        if (Objective == true && dummy == true)
        {
            ninja.CompleteObjective("DDR1");
            //ninja.RemoveObjective("Climb");
            print("it did the thing");
            Objective = false;
            dummy     = false;
        }

        if (dummy2 == true && GameObject.Find("DDR1").GetComponent <DDR1Overlord>().DDR1Done)
        {
            DoorLight.GetComponent <Renderer>().material.color = Color.red;
            dummy2 = false;
        }

        //print(Objective);
    }
Пример #9
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;
        }
    }