コード例 #1
0
ファイル: OnFirstScene.cs プロジェクト: RomitPatil/sag
    void Update()
    {
        if (on)
        {
            MH = gameObject.GetComponentInChildren <MenuHotspot>();

            for (int i = 0; i < gameObject.transform.childCount; i++)
            {
                for (int j = 0; j < gameObject.transform.GetChild(i).childCount; j++)
                {
                    gameObject.transform.GetChild(i).gameObject.SetActive(true);
                }
            }


            if (MH != null)
            {
                for (int i = 0; i < gameObject.transform.childCount; i++)
                {
                    if (gameObject.transform.GetChild(i).GetComponent <PreviewScene>())
                    {
                        gameObject.transform.GetChild(i).gameObject.SetActive(false);
                    }
                }

                gameObject.transform.GetChild(0).gameObject.SetActive(true);
                on = false;
            }
        }


        if (MH != null)
        {
        }
    }
コード例 #2
0
 void Start()
 {
     if (gameObject.GetComponent <navigateActionHotspot> ())
     {
         navigationHotspot = FindObjectOfType <AddHotspot> ();
         posx = navigationHotspot.posx;
         posy = navigationHotspot.posy;
         posz = navigationHotspot.posz;
     }
     if (gameObject.GetComponent <textActionHotspot> ())
     {
         textHotspot = FindObjectOfType <AddTextHotspot> ();
         posx        = textHotspot.posx;
         posy        = textHotspot.posy;
         posz        = textHotspot.posz;
     }
     if (gameObject.GetComponent <NewActionHotspot> ())
     {
         actionHotspot = FindObjectOfType <AddActiveHotspot> ();
         posx          = actionHotspot.posx;
         posy          = actionHotspot.posy;
         posz          = actionHotspot.posz;
     }
     if (gameObject.GetComponent <helpActionHotspot>())
     {
         HelpActionHotpot = FindObjectOfType <helpActionHotspot>();
         posx             = HelpActionHotpot.xpos;
         posy             = HelpActionHotpot.yPos;
         posz             = HelpActionHotpot.zPos;
     }
     if (gameObject.GetComponent <MenuHotspot>())
     {
         MenuHotspot = FindObjectOfType <MenuHotspot>();
         posx        = MenuHotspot.posx;
         posy        = MenuHotspot.posy;
         posz        = MenuHotspot.posz;
     }
     if (gameObject.GetComponent <MediaHotspot>())
     {
         MediaHotspot = FindObjectOfType <MediaHotspot>();
         posx         = MediaHotspot.posx;
         posy         = MediaHotspot.posy;
         posz         = MediaHotspot.posz;
     }
     radius    = 10;
     posz.text = "10";
     R         = 107f;
 }