Exemple #1
0
 private void OnMouseDown()
 {
     if (Gevents.gEvents[2] == 0)
     {
         Gevents.WasEvent(2);
     }
     else
     {
         Gevents.UnWasEvent(2);
     }
 }
    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);
            }
        }
    }
Exemple #3
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;
            }
        }
    }