Beispiel #1
0
    public static void TakeItem(int tii)
    {
        Gevents.WasEvent(tii);

        gItems[tii] = 1;
        SaveItems();

        ItemReFocus(tii);

        Ggos.g.goItems[tii].SetActive(true);
    }
Beispiel #2
0
 private void OnMouseDown()
 {
     if (Gevents.gEvents[2] == 0)
     {
         Gevents.WasEvent(2);
     }
     else
     {
         Gevents.UnWasEvent(2);
     }
 }
Beispiel #3
0
 public static void UseItem(int uiItem, int uiEvent, bool uiDel)
 {
     if (uiItem == activeItem)
     {
         Gevents.WasEvent(uiEvent);
         if (uiDel)
         {
             gItems[uiItem] = 0;
             SaveItems();
             Ggos.g.goItems[uiItem].SetActive(false);
             ItemReFocus(uiItem);
         }
         wasActive = uiEvent;
     }
     else
     {
         wasnotActive = uiEvent;
     }
 }
Beispiel #4
0
    private void OnMouseDown()
    {
        if (Gcam.touchable)
        {
            if (Gevents.gEvents[1] == 0)
            {
                Ggos.g.goSoundImgOff.SetActive(false);
                Ggos.g.goSoundImgOn.SetActive(true);

                Ggos.g.goMainCamera.GetComponent <AudioSource>().mute = true;

                Gevents.WasEvent(1);
            }
            else
            {
                Ggos.g.goSoundImgOff.SetActive(true);
                Ggos.g.goSoundImgOn.SetActive(false);

                Ggos.g.goMainCamera.GetComponent <AudioSource>().mute = false;

                Gevents.UnWasEvent(1);
            }
        }
    }
Beispiel #5
0
    private void FixedUpdate()
    {
        switch (wasActive)
        {
        //********************************************************************************************************
        case 5:
            Ggos.g.goTv101.SetActive(false);
            Ggos.g.goTv11.SetActive(true);
            wasActive = 0;
            break;

        //********************************************************************************************************
        case 10:
            if (count == 0)
            {
                angleTemp      = new Vector3(0f, 0f, 0f);
                Gcam.touchable = false;
                Ggos.g.goDoor1key1.SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[8]);
            }

            if (count > 19)
            {
                angleTemp.z += 12;
                Ggos.g.goDoor1keyhole.transform.localEulerAngles = angleTemp;
            }

            if (count == 50)
            {
                Gcam.myLoc = 0;
                Ggos.g.goDoor1keyholeplate.GetComponent <BoxCollider>().enabled = false;
                Ggos.g.goDoor1.GetComponent <BoxCollider>().enabled             = true;
                ChangeRoom.chrChangeRoom();
            }

            count++;
            if (count > 50)
            {
                count     = 0;
                wasActive = 0;
            }
            break;

        //********************************************************************************************************
        case 14:
            if (count == 0)
            {
                Gcam.touchable = false;
            }

            if (count == 10)
            {
                Ggos.g.goWrenchdrivers1[0].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 330f);
            }
            if (count > 10 && count < 30)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation1bolts[0].transform.localEulerAngles = angleTemp;
            }
            if (count == 30)
            {
                Ggos.g.goVentilation1bolts[0].SetActive(false);
            }

            if (count == 60)
            {
                Ggos.g.goWrenchdrivers1[1].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 0f);
            }
            if (count > 60 && count < 80)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation1bolts[1].transform.localEulerAngles = angleTemp;
            }
            if (count == 80)
            {
                Ggos.g.goVentilation1bolts[1].SetActive(false);
            }

            if (count == 110)
            {
                Ggos.g.goWrenchdrivers1[2].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 0f);
            }
            if (count > 110 && count < 130)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation1bolts[2].transform.localEulerAngles = angleTemp;
            }
            if (count == 130)
            {
                Ggos.g.goVentilation1bolts[2].SetActive(false);
            }

            if (count == 160)
            {
                Ggos.g.goWrenchdrivers1[3].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 330f);
            }
            if (count > 160 && count < 180)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation1bolts[3].transform.localEulerAngles = angleTemp;
            }
            if (count == 180)
            {
                Ggos.g.goVentilation1bolts[3].SetActive(false);
            }
            if (count == 210)
            {
                Ggos.g.goVentilation1grid.SetActive(false);
            }
            if (count == 240)
            {
                Gcam.ChangeLocation(15);
            }

            count++;
            if (count > 240)
            {
                count     = 0;
                wasActive = 0;
            }
            break;

        //********************************************************************************************************
        case 16:
            if (count == 0)
            {
                angleTemp      = new Vector3(0f, 0f, 0f);
                Gcam.touchable = false;
                Ggos.g.goBureau1key2.SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[8]);
            }

            if (count > 19)
            {
                angleTemp.z += 12;
                Ggos.g.goBureau1keyhole2.transform.localEulerAngles = angleTemp;
            }

            count++;
            if (count > 49)
            {
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 18:
            Ggos.g.goPic4pieces[3].SetActive(true);
            Ggos.g.goPic4P.GetComponent <BoxCollider>().enabled = false;
            for (int i = 0; i < 9; i++)
            {
                Ggos.g.goPic4pieces[i].GetComponent <BoxCollider>().enabled = true;
            }
            Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[4]);
            wasActive = 0;
            break;

        //********************************************************************************************************
        case 23:
            if (count == 0)
            {
                Gcam.touchable = false;
                rotTemp        = Quaternion.AngleAxis(10f, Vector3.forward);
            }

            if (count == 10)
            {
                Ggos.g.goScrewdrivers1[0].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 10 && count < 30)
            {
                Ggos.g.goSp1screws[0].transform.localRotation *= rotTemp;
            }
            if (count == 30)
            {
                Ggos.g.goSp1screws[0].SetActive(false);
            }

            if (count == 60)
            {
                Ggos.g.goScrewdrivers1[1].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 60 && count < 80)
            {
                Ggos.g.goSp1screws[1].transform.localRotation *= rotTemp;
            }
            if (count == 80)
            {
                Ggos.g.goSp1screws[1].SetActive(false);
            }

            if (count == 110)
            {
                Ggos.g.goScrewdrivers1[2].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 110 && count < 130)
            {
                Ggos.g.goSp1screws[2].transform.localRotation *= rotTemp;
            }
            if (count == 130)
            {
                Ggos.g.goSp1screws[2].SetActive(false);
            }

            if (count == 160)
            {
                Ggos.g.goScrewdrivers1[3].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 160 && count < 180)
            {
                Ggos.g.goSp1screws[3].transform.localRotation *= rotTemp;
            }
            if (count == 180)
            {
                Ggos.g.goSp1screws[3].SetActive(false);
            }
            if (count == 210)
            {
                Ggos.g.goSp1door.SetActive(false);
            }

            count++;
            if (count > 210)
            {
                Ggos.g.goSp1pin2.GetComponent <BoxCollider>().enabled = true;
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 24:
            if (count == 0)
            {
                Gcam.touchable = false;
                rotTemp        = Quaternion.AngleAxis(10f, Vector3.forward);
            }

            if (count == 10)
            {
                Ggos.g.goScrewdrivers2[0].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 10 && count < 30)
            {
                Ggos.g.goSp2screws[0].transform.localRotation *= rotTemp;
            }
            if (count == 30)
            {
                Ggos.g.goSp2screws[0].SetActive(false);
            }

            if (count == 60)
            {
                Ggos.g.goScrewdrivers2[1].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 60 && count < 80)
            {
                Ggos.g.goSp2screws[1].transform.localRotation *= rotTemp;
            }
            if (count == 80)
            {
                Ggos.g.goSp2screws[1].SetActive(false);
            }

            if (count == 110)
            {
                Ggos.g.goScrewdrivers2[2].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 110 && count < 130)
            {
                Ggos.g.goSp2screws[2].transform.localRotation *= rotTemp;
            }
            if (count == 130)
            {
                Ggos.g.goSp2screws[2].SetActive(false);
            }

            if (count == 160)
            {
                Ggos.g.goScrewdrivers2[3].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
            }
            if (count > 160 && count < 180)
            {
                Ggos.g.goSp2screws[3].transform.localRotation *= rotTemp;
            }
            if (count == 180)
            {
                Ggos.g.goSp2screws[3].SetActive(false);
            }
            if (count == 210)
            {
                Ggos.g.goSp2door.SetActive(false);
            }

            count++;
            if (count > 210)
            {
                Ggos.g.goSp2pin1.GetComponent <BoxCollider>().enabled = true;
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 28:
            if (count == 0)
            {
                Ggos.g.goSp1cogwheels[2].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
                if (Gevents.gEvents[29] == 1 && Gevents.gEvents[32] == 1)
                {
                    Gevents.WasEvent(33);
                    Gcam.touchable = false;
                }
                else
                {
                    count     = -1;
                    wasActive = 0;
                }
            }
            if (count == 29)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[29];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[29];
            }

            if (count > 29 && count < 80)
            {
                angleTemp    = Ggos.g.goPic2indoor1.transform.localPosition;
                angleTemp.x -= 0.002f;
                Ggos.g.goPic2indoor1.transform.localPosition = angleTemp;
                angleTemp    = Ggos.g.goPic2indoor2.transform.localPosition;
                angleTemp.x += 0.002f;
                Ggos.g.goPic2indoor2.transform.localPosition = angleTemp;
            }

            count++;
            if (count >= 110)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[23];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[23];
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 29:
            if (count == 0)
            {
                Ggos.g.goSp2cogwheels[1].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
                if (Gevents.gEvents[28] == 1 && Gevents.gEvents[32] == 1)
                {
                    Gevents.WasEvent(33);
                    Gcam.touchable = false;
                }
                else
                {
                    count     = -1;
                    wasActive = 0;
                }
            }
            if (count == 29)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[29];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[29];
            }

            if (count > 29 && count < 80)
            {
                angleTemp    = Ggos.g.goPic2indoor1.transform.localPosition;
                angleTemp.x -= 0.002f;
                Ggos.g.goPic2indoor1.transform.localPosition = angleTemp;
                angleTemp    = Ggos.g.goPic2indoor2.transform.localPosition;
                angleTemp.x += 0.002f;
                Ggos.g.goPic2indoor2.transform.localPosition = angleTemp;
            }

            count++;
            if (count >= 110)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[24];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[24];
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 31:
            Ggos.g.goPic2pieces[7].SetActive(true);
            Ggos.g.goPic2in.GetComponent <BoxCollider>().enabled = false;
            for (int i = 0; i < 9; i++)
            {
                Ggos.g.goPic2pieces[i].GetComponent <BoxCollider>().enabled = true;
            }
            Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[4]);
            wasActive = 0;
            break;

        //********************************************************************************************************
        case 35:
            Ggos.g.goPic1pieces[6].SetActive(true);
            Ggos.g.goPic1in.GetComponent <BoxCollider>().enabled = false;
            for (int i = 0; i < 9; i++)
            {
                Ggos.g.goPic1pieces[i].GetComponent <BoxCollider>().enabled = true;
            }
            Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[4]);
            wasActive = 0;
            break;

        //********************************************************************************************************
        case 37:
            if (count == 0)
            {
                Gcam.touchable = false;
            }

            if (count == 10)
            {
                Ggos.g.goWrenchdrivers2[0].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 330f);
            }
            if (count > 10 && count < 30)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation2bolts[0].transform.localEulerAngles = angleTemp;
            }
            if (count == 30)
            {
                Ggos.g.goVentilation2bolts[0].SetActive(false);
            }

            if (count == 60)
            {
                Ggos.g.goWrenchdrivers2[1].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 0f);
            }
            if (count > 60 && count < 80)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation2bolts[1].transform.localEulerAngles = angleTemp;
            }
            if (count == 80)
            {
                Ggos.g.goVentilation2bolts[1].SetActive(false);
            }

            if (count == 110)
            {
                Ggos.g.goWrenchdrivers2[2].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 0f);
            }
            if (count > 110 && count < 130)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation2bolts[2].transform.localEulerAngles = angleTemp;
            }
            if (count == 130)
            {
                Ggos.g.goVentilation2bolts[2].SetActive(false);
            }

            if (count == 160)
            {
                Ggos.g.goWrenchdrivers2[3].SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[9]);
                angleTemp = new Vector3(0f, 0f, 330f);
            }
            if (count > 160 && count < 180)
            {
                angleTemp.z -= 2;
                Ggos.g.goVentilation2bolts[3].transform.localEulerAngles = angleTemp;
            }
            if (count == 180)
            {
                Ggos.g.goVentilation2bolts[3].SetActive(false);
            }
            if (count == 210)
            {
                Ggos.g.goVentilation2grid.SetActive(false);
            }
            if (count == 240)
            {
                Gcam.ChangeLocation(34);
            }

            count++;
            if (count > 240)
            {
                count     = 0;
                wasActive = 0;
            }
            break;

        //********************************************************************************************************
        case 39:
            Ggos.g.goPic3pieces[8].SetActive(true);
            Ggos.g.goPic3in.GetComponent <BoxCollider>().enabled = false;
            for (int i = 0; i < 9; i++)
            {
                Ggos.g.goPic3pieces[i].GetComponent <BoxCollider>().enabled = true;
            }
            Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[4]);
            wasActive = 0;
            break;

        //********************************************************************************************************
        case 42:
            if (count == 0)
            {
                Ggos.g.goPic2key1.SetActive(true);
                Ggos.g.goPic2keyhole.GetComponent <BoxCollider>().enabled = false;
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[4]);
                if (Gevents.gEvents[36] == 1 && Gevents.gEvents[40] == 1)
                {
                    Gevents.WasEvent(43);
                    Gevents.WasEvent(44);
                    Gcam.touchable = false;
                }
                else
                {
                    count     = -1;
                    wasActive = 0;
                }
            }
            if (count == 29)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
            }

            if (count > 29 && count < 55)
            {
                angleTemp    = Ggos.g.goPic2key1.transform.localEulerAngles;
                angleTemp.z -= 3.6f;
                Ggos.g.goPic2key1.transform.localEulerAngles = angleTemp;
            }

            if (count == 55)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[31];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[31];
            }

            if (count > 54 && count < 80)
            {
                angleTemp    = Ggos.g.goPic1indoor1.transform.localPosition;
                angleTemp.x -= 0.004f;
                Ggos.g.goPic1indoor1.transform.localPosition = angleTemp;
                angleTemp    = Ggos.g.goPic1indoor2.transform.localPosition;
                angleTemp.x += 0.004f;
                Ggos.g.goPic1indoor2.transform.localPosition = angleTemp;
            }

            if (count == 80)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[35];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[35];
            }

            if (count > 79 && count < 105)
            {
                angleTemp    = Ggos.g.goPic3indoor1.transform.localPosition;
                angleTemp.x -= 0.004f;
                Ggos.g.goPic3indoor1.transform.localPosition = angleTemp;
                angleTemp    = Ggos.g.goPic3indoor2.transform.localPosition;
                angleTemp.x += 0.004f;
                Ggos.g.goPic3indoor2.transform.localPosition = angleTemp;
            }

            if (count == 105)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[30];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[30];
            }

            if (count > 104 && count < 130)
            {
                angleTemp    = Ggos.g.goPic2key1.transform.localEulerAngles;
                angleTemp.z -= 3.6f;
                Ggos.g.goPic2key1.transform.localEulerAngles = angleTemp;
            }

            count++;
            if (count >= 130)
            {
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 46:
            if (count == 0)
            {
                Gcam.touchable = false;
                Ggos.g.goPic1coin1.SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[3]);
            }

            if (count == 29)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
            }

            if (count > 29 && count < 130)
            {
                angleTemp    = Ggos.g.goPic1btnspanel.transform.localEulerAngles;
                angleTemp.y += 1.8f;
                Ggos.g.goPic1btnspanel.transform.localEulerAngles = angleTemp;
                angleTemp    = Ggos.g.goPic1coinsocket.transform.localEulerAngles;
                angleTemp.z += 3.6f;
                Ggos.g.goPic1coinsocket.transform.localEulerAngles = angleTemp;
            }

            count++;
            if (count >= 130)
            {
                Ggos.g.goPic1coinsocket.GetComponent <BoxCollider>().enabled = false;
                for (int i = 0; i < Ggos.g.goPic1btns.Length; i++)
                {
                    Ggos.g.goPic1btns[i].GetComponent <BoxCollider>().enabled = true;
                }
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 48:
            if (count == 0)
            {
                Gcam.touchable = false;
                Ggos.g.goPic3coin1.SetActive(true);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[3]);
            }

            if (count == 29)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
            }

            if (count > 29 && count < 130)
            {
                angleTemp    = Ggos.g.goPic3btnspanel.transform.localEulerAngles;
                angleTemp.y += 1.8f;
                Ggos.g.goPic3btnspanel.transform.localEulerAngles = angleTemp;
                angleTemp    = Ggos.g.goPic3coinsocket.transform.localEulerAngles;
                angleTemp.z += 3.6f;
                Ggos.g.goPic3coinsocket.transform.localEulerAngles = angleTemp;
            }

            count++;
            if (count >= 130)
            {
                Ggos.g.goPic3coinsocket.GetComponent <BoxCollider>().enabled = false;
                for (int i = 0; i < Ggos.g.goPic3btns.Length; i++)
                {
                    Ggos.g.goPic3btns[i].GetComponent <BoxCollider>().enabled = true;
                }
                Gcam.touchable = true;
                count          = 0;
                wasActive      = 0;
            }
            break;

        //********************************************************************************************************
        case 50:
            Ggos.g.goNotebook1flash1.SetActive(true);
            matTemp    = Ggos.g.goNotebook1.GetComponent <MeshRenderer>().materials;
            matTemp[1] = Ggos.g.mats[5];
            Ggos.g.goNotebook1.GetComponent <MeshRenderer>().materials = matTemp;
            Ggos.g.goNotebook1.GetComponent <BoxCollider>().enabled    = false;
            Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[4]);
            wasActive = 0;
            break;

        //********************************************************************************************************
        default:
            wasActive = 0;
            break;
        }



        switch (wasnotActive)
        {
        //********************************************************************************************************
        case 10:
            if (count == 0)
            {
                angleTemp      = new Vector3(0f, 0f, 0f);
                Gcam.touchable = false;
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[1]);
            }

            if (count < 8)
            {
                angleTemp.z += 3;
                Ggos.g.goDoor1handle.transform.localEulerAngles = angleTemp;
            }

            if (count >= 8)
            {
                angleTemp.z -= 3;
                Ggos.g.goDoor1handle.transform.localEulerAngles = angleTemp;
            }

            count++;
            if (count > 15)
            {
                Gcam.touchable = true;
                count          = 0;
                wasnotActive   = 0;
            }
            break;

        //********************************************************************************************************
        case 16:
            Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[1]);
            wasnotActive = 0;
            break;

        //********************************************************************************************************
        default:
            wasnotActive = 0;
            break;
        }
    }
Beispiel #6
0
    private void FixedUpdate()
    {
        if (doAction)
        {
            if (count < 50)
            {
                if (count == 1)
                {
                    Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[7]);
                }
                c.a += 0.02f;
                Ggos.g.goCanvas40BG.GetComponent <Image>().color = c;
                if (count < 25)
                {
                    angleTemp.z += angleDelta;
                    goTemp.transform.localEulerAngles = angleTemp;
                }
                else
                {
                    angleTemp.z -= angleDelta;
                    goTemp.transform.localEulerAngles = angleTemp;
                }

                count++;
            }
            if (count >= 50 && count < 75)
            {
                if (count == 51)
                {
                    if (Gevents.gEvents[0] == 0)
                    {
                        Gevents.WasEvent(0);
                        Gcam.PosReset();
                        Ggos.g.goRoom1.SetActive(false);
                        Ggos.g.goRoom2.SetActive(true);
                    }
                    else
                    {
                        Gevents.UnWasEvent(0);
                        Gcam.PosReset();
                        Ggos.g.goRoom2.SetActive(false);
                        Ggos.g.goRoom1.SetActive(true);
                    }
                    Ggos.g.goArrowImg1.SetActive(false);
                    AdvManager.AdvInterShow();
                }
                count++;
            }
            if (count >= 75)
            {
                c.a -= 0.02f;
                Ggos.g.goCanvas40BG.GetComponent <Image>().color = c;
                count++;
            }
            if (count == 125)
            {
                Gcam.touchable = true;
                Gcam.rotable   = true;
                count          = 0;
                doAction       = false;
            }
        }
    }
Beispiel #7
0
    private void FixedUpdate()
    {
        switch (rightCode)
        {
        //********************************************************************************************************
        case 1:
            switch (count)
            {
            case 0:
                Gcam.touchable = false;
                Gevents.WasEvent(6);
                for (int i = 0; i < Ggos.g.goLamp1rolls.Length; i++)
                {
                    Ggos.g.goLamp1rolls[i].GetComponent <BoxCollider>().enabled = false;
                }
                count++;
                break;

            case 10:
                matBuff    = Ggos.g.goLamp1rolls[0].GetComponent <MeshRenderer>().materials;
                matBuff[6] = Ggos.g.mats[3];
                Ggos.g.goLamp1rolls[0].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 20:
                matBuff    = Ggos.g.goLamp1rolls[1].GetComponent <MeshRenderer>().materials;
                matBuff[4] = Ggos.g.mats[3];
                Ggos.g.goLamp1rolls[1].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 30:
                matBuff    = Ggos.g.goLamp1rolls[2].GetComponent <MeshRenderer>().materials;
                matBuff[2] = Ggos.g.mats[3];
                Ggos.g.goLamp1rolls[2].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 40:
                matBuff    = Ggos.g.goLamp1rolls[3].GetComponent <MeshRenderer>().materials;
                matBuff[5] = Ggos.g.mats[3];
                Ggos.g.goLamp1rolls[3].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 60:
                Ggos.g.goMainCamera.transform.localPosition    = new Vector3(-2.2f, 1f, 1.38f);
                Ggos.g.goMainCamera.transform.localEulerAngles = new Vector3(65f, 0f, 0f);
                count++;
                break;

            case 100:
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
                Ggos.g.goBad1table1drawer.transform.localPosition = new Vector3(-2.19f, 0.26f, 1.55f);
                count++;
                break;

            case 140:
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[6];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[6];
                Gcam.touchable = true;
                rightCode      = 0;
                count          = 0;
                break;

            default:
                count++;
                break;
            }
            break;

        //********************************************************************************************************
        case 2:
            switch (count)
            {
            case 0:
                Gcam.touchable = false;
                Gevents.WasEvent(8);
                for (int i = 0; i < Ggos.g.goBookshelf3books.Length; i++)
                {
                    Ggos.g.goBookshelf3books[i].GetComponent <BoxCollider>().enabled = false;
                }
                Ggos.g.goDoor1key0.GetComponent <BoxCollider>().enabled = true;
                Ggos.g.goCard1.GetComponent <BoxCollider>().enabled     = true;
                posTemp = new Vector3(0f, 0f, 0f);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
                count++;
                break;

            case 29:
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
                count++;
                break;

            case 30:
                posTemp.y += 0.0016f;
                Ggos.g.goBookshelf3in.transform.localPosition = posTemp;
                if (posTemp.y >= 0.1584f)
                {
                    Gcam.touchable = true;
                    rightCode      = 0;
                    count          = 0;
                }
                break;

            default:
                count++;
                break;
            }
            break;

        //********************************************************************************************************
        case 3:
            switch (count)
            {
            case 0:
                Gcam.touchable = false;
                Gevents.WasEvent(12);
                for (int i = 0; i < Ggos.g.goBookshelf2books.Length; i++)
                {
                    Ggos.g.goBookshelf2books[i].GetComponent <BoxCollider>().enabled = false;
                }
                Ggos.g.goWrenchdriver0.GetComponent <BoxCollider>().enabled = true;
                Ggos.g.goBox4.GetComponent <BoxCollider>().enabled          = true;
                posTemp = new Vector3(0f, 0f, 0f);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
                count++;
                break;

            case 29:
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
                count++;
                break;

            case 30:
                posTemp.y += 0.0016f;
                Ggos.g.goBookshelf2in.transform.localPosition = posTemp;
                if (posTemp.y >= 0.1584f)
                {
                    Gcam.touchable = true;
                    rightCode      = 0;
                    count          = 0;
                }
                break;

            default:
                count++;
                break;
            }
            break;

        //********************************************************************************************************
        case 4:
            if (count == 0)
            {
                Gcam.touchable = false;
                Gevents.WasEvent(19);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
            }
            if (count == 29)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
            }
            if (count > 29 && count < 130)
            {
                posTemp    = Ggos.g.goSafe2.transform.localPosition;
                posTemp.z += 0.045f;
                Ggos.g.goSafe2.transform.localPosition = posTemp;
            }
            if (count == 29)
            {
                posTemp   = Ggos.g.goPic4pieces[7].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[7].transform.localPosition = posTemp;
            }
            if (count > 29)
            {
                Ggos.g.goPic4pieces[7].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[7].transform.localPosition, pic4target2, Time.deltaTime * 0.8f);
            }

            if (count == 39)
            {
                posTemp   = Ggos.g.goPic4pieces[0].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[0].transform.localPosition = posTemp;
            }
            if (count > 39)
            {
                Ggos.g.goPic4pieces[0].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[0].transform.localPosition, pic4target4, Time.deltaTime * 0.8f);
            }

            if (count == 49)
            {
                posTemp   = Ggos.g.goPic4pieces[5].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[5].transform.localPosition = posTemp;
            }
            if (count > 49)
            {
                Ggos.g.goPic4pieces[5].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[5].transform.localPosition, pic4target6, Time.deltaTime * 0.8f);
            }

            if (count == 59)
            {
                posTemp   = Ggos.g.goPic4pieces[3].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[3].transform.localPosition = posTemp;
            }
            if (count > 59)
            {
                Ggos.g.goPic4pieces[3].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[3].transform.localPosition, pic4target1, Time.deltaTime * 0.8f);
            }

            if (count == 69)
            {
                posTemp   = Ggos.g.goPic4pieces[4].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[4].transform.localPosition = posTemp;
            }
            if (count > 69)
            {
                Ggos.g.goPic4pieces[4].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[4].transform.localPosition, pic4target5, Time.deltaTime * 0.8f);
            }

            if (count == 79)
            {
                posTemp   = Ggos.g.goPic4pieces[8].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[8].transform.localPosition = posTemp;
            }
            if (count > 79)
            {
                Ggos.g.goPic4pieces[8].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[8].transform.localPosition, pic4target3, Time.deltaTime * 0.8f);
            }

            if (count == 89)
            {
                posTemp   = Ggos.g.goPic4pieces[1].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[1].transform.localPosition = posTemp;
            }
            if (count > 89)
            {
                Ggos.g.goPic4pieces[1].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[1].transform.localPosition, pic4target2, Time.deltaTime * 0.8f);
            }

            if (count == 99)
            {
                posTemp   = Ggos.g.goPic4pieces[6].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[6].transform.localPosition = posTemp;
            }
            if (count > 99)
            {
                Ggos.g.goPic4pieces[6].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[6].transform.localPosition, pic4target4, Time.deltaTime * 0.8f);
            }

            if (count == 109)
            {
                posTemp   = Ggos.g.goPic4pieces[2].transform.localPosition;
                posTemp.z = 0.01f;
                Ggos.g.goPic4pieces[2].transform.localPosition = posTemp;
            }
            if (count > 109)
            {
                Ggos.g.goPic4pieces[2].transform.localPosition = Vector3.Lerp(Ggos.g.goPic4pieces[2].transform.localPosition, pic4target3, Time.deltaTime * 0.8f);
            }

            count++;
            if (count >= 130)
            {
                for (int i = 0; i < 9; i++)
                {
                    Ggos.g.goPic4pieces[i].SetActive(false);
                }
                for (int i = 0; i < 4; i++)
                {
                    Ggos.g.goSafe2coderolls[i].GetComponent <BoxCollider>().enabled = true;
                }
                Gcam.touchable = true;
                count          = 0;
                rightCode      = 0;
            }
            break;

        //********************************************************************************************************
        case 5:
            if (count == 0)
            {
                Gcam.touchable = false;
                Gevents.WasEvent(21);
                for (int i = 0; i < Ggos.g.goSafe2coderolls.Length; i++)
                {
                    Ggos.g.goSafe2coderolls[i].GetComponent <BoxCollider>().enabled = false;
                }
                Ggos.g.goPiramids[0].GetComponent <BoxCollider>().enabled     = true;
                Ggos.g.goNotebook1flash0.GetComponent <BoxCollider>().enabled = true;
                Ggos.g.goPic2key0.GetComponent <BoxCollider>().enabled        = true;
            }
            if (count == 10)
            {
                matBuff    = Ggos.g.goSafe2coderolls[0].GetComponent <MeshRenderer>().materials;
                matBuff[2] = Ggos.g.mats[3];
                Ggos.g.goSafe2coderolls[0].GetComponent <MeshRenderer>().materials = matBuff;
            }

            if (count == 20)
            {
                matBuff    = Ggos.g.goSafe2coderolls[1].GetComponent <MeshRenderer>().materials;
                matBuff[3] = Ggos.g.mats[3];
                Ggos.g.goSafe2coderolls[1].GetComponent <MeshRenderer>().materials = matBuff;
            }

            if (count == 30)
            {
                matBuff    = Ggos.g.goSafe2coderolls[2].GetComponent <MeshRenderer>().materials;
                matBuff[5] = Ggos.g.mats[3];
                Ggos.g.goSafe2coderolls[2].GetComponent <MeshRenderer>().materials = matBuff;
            }
            if (count == 40)
            {
                matBuff    = Ggos.g.goSafe2coderolls[3].GetComponent <MeshRenderer>().materials;
                matBuff[7] = Ggos.g.mats[3];
                Ggos.g.goSafe2coderolls[3].GetComponent <MeshRenderer>().materials = matBuff;
            }

            if (count == 50)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
            }

            if (count == 60)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
            }

            if (count > 59 && count < 110)
            {
                rotTemp = Quaternion.AngleAxis(3.6f, Vector3.up);
                for (int i = 0; i < Ggos.g.goSafe2codes.Length; i++)
                {
                    Ggos.g.goSafe2codes[i].transform.localRotation *= rotTemp;
                }
            }

            if (count > 109 && count < 160)
            {
                posTemp    = Ggos.g.goSafe2codes[0].transform.localPosition;
                posTemp.y += 0.0049f;
                Ggos.g.goSafe2codes[0].transform.localPosition = posTemp;

                posTemp    = Ggos.g.goSafe2codes[1].transform.localPosition;
                posTemp.x += 0.0049f;
                Ggos.g.goSafe2codes[1].transform.localPosition = posTemp;

                posTemp    = Ggos.g.goSafe2codes[2].transform.localPosition;
                posTemp.x -= 0.0049f;
                Ggos.g.goSafe2codes[2].transform.localPosition = posTemp;

                posTemp    = Ggos.g.goSafe2codes[3].transform.localPosition;
                posTemp.y -= 0.0049f;
                Ggos.g.goSafe2codes[3].transform.localPosition = posTemp;
            }


            count++;
            if (count >= 160)
            {
                Gcam.touchable = true;
                count          = 0;
                rightCode      = 0;
            }
            break;

        //********************************************************************************************************
        case 6:
            switch (count)
            {
            case 0:
                Gcam.touchable = false;
                Gevents.WasEvent(25);
                for (int i = 0; i < Ggos.g.goLamp2rolls.Length; i++)
                {
                    Ggos.g.goLamp2rolls[i].GetComponent <BoxCollider>().enabled = false;
                }
                count++;
                break;

            case 10:
                matBuff    = Ggos.g.goLamp2rolls[0].GetComponent <MeshRenderer>().materials;
                matBuff[4] = Ggos.g.mats[3];
                Ggos.g.goLamp2rolls[0].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 20:
                matBuff    = Ggos.g.goLamp2rolls[1].GetComponent <MeshRenderer>().materials;
                matBuff[3] = Ggos.g.mats[3];
                Ggos.g.goLamp2rolls[1].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 30:
                matBuff    = Ggos.g.goLamp2rolls[2].GetComponent <MeshRenderer>().materials;
                matBuff[6] = Ggos.g.mats[3];
                Ggos.g.goLamp2rolls[2].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 40:
                matBuff    = Ggos.g.goLamp2rolls[3].GetComponent <MeshRenderer>().materials;
                matBuff[2] = Ggos.g.mats[3];
                Ggos.g.goLamp2rolls[3].GetComponent <MeshRenderer>().materials = matBuff;
                count++;
                break;

            case 60:
                Ggos.g.goMainCamera.transform.localPosition    = new Vector3(0.4f, 1f, 1.38f);
                Ggos.g.goMainCamera.transform.localEulerAngles = new Vector3(65f, 0f, 0f);
                count++;
                break;

            case 100:
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
                Ggos.g.goBad1table2drawer.transform.localPosition = new Vector3(0.39f, 0.26f, 1.55f);
                count++;
                break;

            case 140:
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[26];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[26];
                Gcam.touchable = true;
                rightCode      = 0;
                count          = 0;
                break;

            default:
                count++;
                break;
            }
            break;

        //********************************************************************************************************
        case 7:
            if (count == 0)
            {
                Gcam.touchable = false;
                Gevents.WasEvent(32);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
            }
            if (count == 29)
            {
                posTemp   = Ggos.g.goPic2pieces[4].transform.localPosition;
                posTemp.z = -0.01f;
                Ggos.g.goPic2pieces[4].transform.localPosition = posTemp;
            }
            if (count > 29)
            {
                Ggos.g.goPic2pieces[4].transform.localPosition = Vector3.Lerp(Ggos.g.goPic2pieces[4].transform.localPosition, pic123target, Time.deltaTime * 2f);
            }
            if (count == 50)
            {
                if (Gevents.gEvents[28] == 1 && Gevents.gEvents[29] == 1)
                {
                    Gevents.WasEvent(33);
                    Gcam.ChangeLocation(30);
                }
                else
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Ggos.g.goPic2pieces[i].GetComponent <BoxCollider>().enabled = false;
                    }
                    Ggos.g.goPic2pieces[4].SetActive(false);
                    Gcam.touchable = true;
                    count          = -1;
                    rightCode      = 0;
                }
            }
            if (count > 50 && count < 100)
            {
                Debug.Log(count);
                posTemp    = Ggos.g.goPic2indoor1.transform.localPosition;
                posTemp.x -= 0.002f;
                Ggos.g.goPic2indoor1.transform.localPosition = posTemp;

                posTemp    = Ggos.g.goPic2indoor2.transform.localPosition;
                posTemp.x += 0.002f;
                Ggos.g.goPic2indoor2.transform.localPosition = posTemp;
            }

            count++;
            if (count >= 100)
            {
                for (int i = 0; i < 9; i++)
                {
                    Ggos.g.goPic2pieces[i].GetComponent <BoxCollider>().enabled = false;
                }
                Ggos.g.goPic2pieces[4].SetActive(false);
                Ggos.g.goPic2keyhole.GetComponent <BoxCollider>().enabled = true;
                Ggos.g.goPic1.GetComponent <BoxCollider>().enabled        = true;
                Ggos.g.goPic3.GetComponent <BoxCollider>().enabled        = true;
                Gcam.touchable = true;
                count          = 0;
                rightCode      = 0;
            }
            break;

        //********************************************************************************************************
        case 8:
            if (count == 0)
            {
                Gcam.touchable = false;
                Gevents.WasEvent(36);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
            }
            if (count == 29)
            {
                posTemp   = Ggos.g.goPic1pieces[4].transform.localPosition;
                posTemp.z = -0.01f;
                Ggos.g.goPic1pieces[4].transform.localPosition = posTemp;
            }
            if (count > 29)
            {
                Ggos.g.goPic1pieces[4].transform.localPosition = Vector3.Lerp(Ggos.g.goPic1pieces[4].transform.localPosition, pic123target, Time.deltaTime * 2f);
            }
            if (count == 50)
            {
                if (Gevents.gEvents[42] == 1 && Gevents.gEvents[40] == 1)
                {
                    Gevents.WasEvent(43);
                    Gevents.WasEvent(44);
                }
                else
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Ggos.g.goPic1pieces[i].GetComponent <BoxCollider>().enabled = false;
                    }
                    Ggos.g.goPic1pieces[4].SetActive(false);
                    Gcam.touchable = true;
                    count          = -1;
                    rightCode      = 0;
                }
            }
            if (count == 79)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[30];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[30];
            }

            if (count > 79 && count < 105)
            {
                posTemp    = Ggos.g.goPic2key1.transform.localEulerAngles;
                posTemp.z -= 3.6f;
                Ggos.g.goPic2key1.transform.localEulerAngles = posTemp;
            }

            if (count == 105)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[35];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[35];
            }

            if (count > 104 && count < 130)
            {
                posTemp    = Ggos.g.goPic3indoor1.transform.localPosition;
                posTemp.x -= 0.004f;
                Ggos.g.goPic3indoor1.transform.localPosition = posTemp;
                posTemp    = Ggos.g.goPic3indoor2.transform.localPosition;
                posTemp.x += 0.004f;
                Ggos.g.goPic3indoor2.transform.localPosition = posTemp;
            }

            if (count == 130)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[31];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[31];
            }

            if (count > 129 && count < 155)
            {
                posTemp    = Ggos.g.goPic1indoor1.transform.localPosition;
                posTemp.x -= 0.004f;
                Ggos.g.goPic1indoor1.transform.localPosition = posTemp;
                posTemp    = Ggos.g.goPic1indoor2.transform.localPosition;
                posTemp.x += 0.004f;
                Ggos.g.goPic1indoor2.transform.localPosition = posTemp;
            }

            count++;
            if (count >= 180)
            {
                for (int i = 0; i < 9; i++)
                {
                    Ggos.g.goPic1pieces[i].GetComponent <BoxCollider>().enabled = false;
                }
                Ggos.g.goPic1pieces[4].SetActive(false);
                Ggos.g.goPic1coinsocket.GetComponent <BoxCollider>().enabled = true;
                Ggos.g.goPic2.GetComponent <BoxCollider>().enabled           = true;
                Ggos.g.goLamp2.GetComponent <BoxCollider>().enabled          = true;
                Gcam.ChangeLocation(32);
                count     = 0;
                rightCode = 0;
            }
            break;

        //********************************************************************************************************
        case 9:
            if (count == 0)
            {
                Gcam.touchable = false;
                Gevents.WasEvent(40);
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[5]);
            }
            if (count == 29)
            {
                posTemp   = Ggos.g.goPic3pieces[4].transform.localPosition;
                posTemp.z = -0.01f;
                Ggos.g.goPic3pieces[4].transform.localPosition = posTemp;
            }
            if (count > 29)
            {
                Ggos.g.goPic3pieces[4].transform.localPosition = Vector3.Lerp(Ggos.g.goPic3pieces[4].transform.localPosition, pic123target, Time.deltaTime * 2f);
            }
            if (count == 50)
            {
                if (Gevents.gEvents[42] == 1 && Gevents.gEvents[36] == 1)
                {
                    Gevents.WasEvent(43);
                    Gevents.WasEvent(44);
                }
                else
                {
                    for (int i = 0; i < 9; i++)
                    {
                        Ggos.g.goPic3pieces[i].GetComponent <BoxCollider>().enabled = false;
                    }
                    Ggos.g.goPic3pieces[4].SetActive(false);
                    Gcam.touchable = true;
                    count          = -1;
                    rightCode      = 0;
                }
            }

            if (count == 79)
            {
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[6]);
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[30];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[30];
            }

            if (count > 79 && count < 105)
            {
                posTemp    = Ggos.g.goPic2key1.transform.localEulerAngles;
                posTemp.z -= 3.6f;
                Ggos.g.goPic2key1.transform.localEulerAngles = posTemp;
            }

            if (count == 105)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[31];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[31];
            }

            if (count > 104 && count < 130)
            {
                posTemp    = Ggos.g.goPic1indoor1.transform.localPosition;
                posTemp.x -= 0.004f;
                Ggos.g.goPic1indoor1.transform.localPosition = posTemp;
                posTemp    = Ggos.g.goPic1indoor2.transform.localPosition;
                posTemp.x += 0.004f;
                Ggos.g.goPic1indoor2.transform.localPosition = posTemp;
            }

            if (count == 130)
            {
                Ggos.g.goMainCamera.transform.localPosition    = Gcam.camPos[35];
                Ggos.g.goMainCamera.transform.localEulerAngles = Gcam.camRot[35];
            }

            if (count > 129 && count < 155)
            {
                posTemp    = Ggos.g.goPic3indoor1.transform.localPosition;
                posTemp.x -= 0.004f;
                Ggos.g.goPic3indoor1.transform.localPosition = posTemp;
                posTemp    = Ggos.g.goPic3indoor2.transform.localPosition;
                posTemp.x += 0.004f;
                Ggos.g.goPic3indoor2.transform.localPosition = posTemp;
            }

            count++;
            if (count >= 180)
            {
                for (int i = 0; i < 9; i++)
                {
                    Ggos.g.goPic3pieces[i].GetComponent <BoxCollider>().enabled = false;
                }
                Ggos.g.goPic3pieces[4].SetActive(false);
                Ggos.g.goPic3coinsocket.GetComponent <BoxCollider>().enabled = true;
                Ggos.g.goPic2.GetComponent <BoxCollider>().enabled           = true;
                Gcam.ChangeLocation(36);
                count     = 0;
                rightCode = 0;
            }
            break;

        //********************************************************************************************************
        case 10:
            if (count == 0)
            {
                Gcam.touchable = false;
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[11]);
            }

            if (count == 15)
            {
                for (int i = 0; i < codeReal[10].Length; i++)
                {
                    matBuff    = Ggos.g.goPic1btns[codeReal[10][i]].GetComponent <MeshRenderer>().materials;
                    matBuff[0] = Ggos.g.mats[3];
                    Ggos.g.goPic1btns[codeReal[10][i]].GetComponent <MeshRenderer>().materials = matBuff;
                }
                rotTemp = Quaternion.AngleAxis(6f, Vector3.up);
            }

            if (count > 29 && count < 60)
            {
                Ggos.g.goPic1btnspanel.transform.localRotation *= rotTemp;
            }

            if (count == 59)
            {
                Ggos.g.goMainCamera.transform.localPosition    = new Vector3();
                Ggos.g.goMainCamera.transform.localEulerAngles = new Vector3();
            }

            count++;
            if (count > 200)
            {
                Gcam.touchable = true;
                count          = 0;
                rightCode      = 0;
            }
            break;
        }
        switch (errorCode)
        {
        //********************************************************************************************************
        case 10:
            if (count == 0)
            {
                Gcam.touchable = false;
                Ggos.g.goMainCamera.GetComponent <AudioSource>().PlayOneShot(Ggos.g.audioClips[10]);
                for (int i = 1; i < Ggos.g.goPic1btns.Length; i++)
                {
                    Ggos.g.goPic1btns[i].GetComponent <BoxCollider>().enabled = true;
                }
                for (int i = 0; i < codeReal[10].Length; i++)
                {
                    matBuff    = Ggos.g.goPic1btns[codeReal[10][i]].GetComponent <MeshRenderer>().materials;
                    matBuff[0] = Ggos.g.mats[6];
                    Ggos.g.goPic1btns[codeReal[10][i]].GetComponent <MeshRenderer>().materials = matBuff;
                }
            }

            if (count == 25)
            {
                for (int i = 0; i < codeReal[10].Length; i++)
                {
                    matBuff    = Ggos.g.goPic1btns[codeReal[10][i]].GetComponent <MeshRenderer>().materials;
                    matBuff[0] = Ggos.g.mats[2];
                    Ggos.g.goPic1btns[codeReal[10][i]].GetComponent <MeshRenderer>().materials = matBuff;
                    codeReal[10][i] = 0;
                }
            }

            count++;
            if (count > 25)
            {
                picPointer[10] = 0;
                Gcam.touchable = true;
                count          = 0;
                errorCode      = 0;
            }

            break;

        default:
            errorCode = 0;
            break;
        }
    }