Exemplo n.º 1
0
    void Awake()
    {
        touch              = GameObject.Find("Player").GetComponent <PlayerMovements>();
        tuboChecker        = GameObject.Find("Player").GetComponent <TuboChecker>();
        tickerMsg          = GameObject.Find("DisplayTicker").GetComponent <TickerMessage>(); //r
        newQuest           = GameObject.Find("GUIQUnlock").GetComponent <QuestUnlocked>();
        MusicAudioListener = GameObject.Find("MusicManager").GetComponent <AudioListener>();  //r //comment this if you are about to edit the scene

        disableBts = true;
    }
Exemplo n.º 2
0
    void LateUpdate()
    {
        if (enablePart2)
        {
            act4part2 = GameObject.Find("Player").GetComponent <NewAct4Part2>();
            if (act4part2.onQuest3)
            {
                school.SetActive(true);
            }

            if (act4part2 == null)
            {
                school.SetActive(false);
                return;
            }
        }


        if (enablePart3)
        {
            act4part3 = GameObject.Find("Player").GetComponent <NewAct4Part3>();
            tubocheck = GameObject.Find("Player").GetComponent <TuboChecker>();

            completeTubo1 = act4part3.iT1;
            completeTubo2 = act4part3.iT2;
            completeTubo3 = act4part3.iT3;
            completeTubo4 = act4part3.iT4;
            completeTubo5 = act4part3.iT5;
            completeTubo6 = act4part3.iT6;
            completeTubo7 = act4part3.iT7;

            tubopref1 = PlayerPrefs.GetInt("Tubo1");
            tubopref2 = PlayerPrefs.GetInt("Tubo2");
            tubopref3 = PlayerPrefs.GetInt("Tubo3");

            if (tubopref1 == 1)
            {
                Tubo1pipe7red.SetActive(true);
                if (completeTubo7 == true)
                {
                    Tubo1pipe7gray.SetActive(true);
                    Tubo1pipe7red.SetActive(false);
                }
            }
            if (tubopref2 == 1)
            {
                Tubo2pipe4red.SetActive(true);
                if (completeTubo4 == true)
                {
                    Tubo2pipe4gray.SetActive(true);
                    Tubo2pipe4red.SetActive(false);
                }
            }
            if (tubopref3 == 1)
            {
                Tubo3pipe5red.SetActive(true);
                Tubo3pipe6red.SetActive(true);

                if (completeTubo5 == true)
                {
                    Tubo3pipe5gray.SetActive(true);
                    Tubo3pipe5red.SetActive(false);
                }
                if (completeTubo6 == true)
                {
                    Tubo3pipe6gray.SetActive(true);
                    Tubo3pipe6red.SetActive(false);
                }
            }
            if (act4part3 == null)
            {
                Debug.Log("act4part3 disabled");
                return;
            }
        }
    }
Exemplo n.º 3
0
    private void LateUpdate()     //r changed this access modifier to private
    {
        if (act4part3.GetComponent <NewAct4Part3>().enabled == true)
        {
            enablePart2 = false;
            enablePart3 = true;
        }

        if (enablePart2)
        {
            act4part2 = GameObject.Find("Player").GetComponent <NewAct4Part2>();
            Debug.Log("act4part2 enabled");

            if ((act4part2.currentLine6 == 0) && (act4part2.onQuest5))
            {
                //Debug.Log("onquest4");
                gameObject.SendMessage("ShowIt", 20);
                gameObject.SendMessage("QuestStatus");
            }
            if ((act4part2.currentLine6 == 1) && (act4part2.onQuest5))
            {
                //Debug.Log("2nd");
                gameObject.SendMessage("ShowIt", 18);
                gameObject.SendMessage("QuestStatus");
            }
            if ((act4part2.currentLine6 == 14) && (act4part2.onQuest5))
            {
                //Debug.Log("last");
                gameObject.SendMessage("ShowIt", 20);
                gameObject.SendMessage("QuestStatus");
            }
            if (enablePart2 == null)
            {
                return;
            }
        }
        if (enablePart3)
        {
            act4part3 = GameObject.Find("Player").GetComponent <NewAct4Part3>();
            tubopref1 = PlayerPrefs.GetInt("Tubo1");
            tubopref2 = PlayerPrefs.GetInt("Tubo2");
            tubopref3 = PlayerPrefs.GetInt("Tubo3");

            completeTubo1 = act4part3.Tub1;
            completeTubo2 = act4part3.Tub1;
            completeTubo3 = act4part3.Tub1;


            tubocheck = GameObject.Find("Player").GetComponent <TuboChecker>();
            Debug.Log("tubocheck enabled");
//			if(tubopref1==1||tubopref2==1||tubopref3==1){
//				gameObject.SendMessage("ShowIt",29);
//				gameObject.SendMessage("QuestStatus");
            if (tubopref1 == 1)
            {
                //Debug.Log("onquest4");
                gameObject.SendMessage("ShowIt", 29);
                gameObject.SendMessage("QuestStatus");
                if (completeTubo1 == 1)
                {
                    gameObject.SendMessage("ShowIt", 28);
                    gameObject.SendMessage("QuestStatus");
                    //MakeFalse();
                }
            }
            if (tubopref2 == 1 || tubopref3 == 1)
            {
                gameObject.SendMessage("ShowIt", 1);
                gameObject.SendMessage("QuestStatus");
            }
            //}
        }
    }
Exemplo n.º 4
0
    private void LateUpdate()     //r changed this access modifier to private
    {
        if (enablePart2 == true)
        {
            act4part2 = GameObject.Find("Player").GetComponent <NewAct4Part2>();

            Debug.Log("act4part2 enabled");
//
//			if((act4part2.currentLine6==0)&&(act4part2.onQuest5)){
//				//Debug.Log("onquest4");
//				gameObject.SendMessage("ShowIt",20);
//				gameObject.SendMessage("QuestStatus");}
//			if((act4part2.currentLine6==1)&&(act4part2.onQuest5)){
//				//Debug.Log("2nd");
//				gameObject.SendMessage("ShowIt",18);
//				gameObject.SendMessage("QuestStatus");
//			}
//			if((act4part2.currentLine6==14)&&(act4part2.onQuest5)){
//				//Debug.Log("last");
//				gameObject.SendMessage("ShowIt",20);
//				gameObject.SendMessage("QuestStatus");
//			}
        }
        if (enablePart3 == true)
        {
            act4part3 = GameObject.Find("Player").GetComponent <NewAct4Part3>();
            //tubocheck = GameObject.Find ("Player").GetComponent<TuboChecker>();
            Debug.Log("act4part3 enabled");
//			act4part3 = GameObject.Find ("Player").GetComponent<NewAct4Part3>();
            tubopref1 = PlayerPrefs.GetInt("Tubo1");
            tubopref2 = PlayerPrefs.GetInt("Tubo2");
            tubopref3 = PlayerPrefs.GetInt("Tubo3");

            completeTubo1 = act4part3.Tub1;
            completeTubo2 = act4part3.Tub2;
            completeTubo3 = act4part3.Tub3;
            completeTubo4 = act4part3.Tub4;
            completeTubo5 = act4part3.Tub5;
            completeTubo6 = act4part3.Tub6;
            completeTubo7 = act4part3.Tub7;


            tubocheck = GameObject.Find("Player").GetComponent <TuboChecker>();
            Debug.Log("tubocheck enabled");
            //if(tubopref1==1||tubopref2==1||tubopref3==1){
//				gameObject.SendMessage("ShowIt",27);
//				gameObject.SendMessage("QuestStatus");
            if (tubopref1 == 1)
            {
                gameObject.SendMessage("ShowIt", 27);
                gameObject.SendMessage("QuestStatus");
                Debug.Log("Picked tubo" + tubopref1);

                if (completeTubo2 == 1)
                {
                    gameObject.SendMessage("ShowIt", 26);
                    gameObject.SendMessage("QuestStatus");
                    //MakeFalse();
                    Debug.Log("tubo is fixed" + completeTubo2);
                }
//								else {
//	//							if(completeTubo2==0&&completeTubo2!=1){
//									gameObject.SendMessage("ShowIt",27);
//									gameObject.SendMessage("QuestStatus");
//									Debug.Log ("not yet fixed2"+completeTubo2);}
            }


            if (tubopref3 == 1)
            {
                gameObject.SendMessage("ShowIt", 25);
                gameObject.SendMessage("QuestStatus");
                Debug.Log("Picked tubo" + tubopref3);
                if (completeTubo3 == 1)
                {
                    gameObject.SendMessage("ShowIt", 24);
                    gameObject.SendMessage("QuestStatus");
                    //MakeFalse();
                    Debug.Log("tubo is fixed" + completeTubo3);
                }
                else
                {
                    //							if(completeTubo2==0&&completeTubo2!=1){
                    gameObject.SendMessage("ShowIt", 25);
                    gameObject.SendMessage("QuestStatus");
                    Debug.Log("not yet fixed3" + completeTubo3);
                }
            }
            if (act4part3 == null)
            {
                Debug.Log("null");
                return;
            }
        }
        //			else if(){}



        //}
    }
Exemplo n.º 5
0
 void Awake()
 {
     act4part2 = GameObject.Find("Player").GetComponent <NewAct4Part2>();
     act4part3 = GameObject.Find("Player").GetComponent <NewAct4Part3>();
     tubocheck = GameObject.Find("Player").GetComponent <TuboChecker>();
 }