Esempio n. 1
0
    public void OnClickMediaHotspot()
    {
        addMediaHotspot.SelectedMediaHotspot = gameObject.GetComponent <MediaHotspot>();
        addMediaHotspot.BtnID.text           = "Btn ID :" + Btn_ID;
        addMediaHotspot.Pos_X.text           = Position.x.ToString();
        addMediaHotspot.Pos_Y.text           = Position.y.ToString();
        addMediaHotspot.InputUrl.text        = videoURL;
        addMediaHotspot.Potrate    = Potrate;
        addMediaHotspot.Lanscape   = landscape;
        addMediaHotspot.FullScreen = fullScreen;
        if (gameObject.transform.localPosition.z != 0)
        {
            gameObject.transform.GetChild(0).gameObject.transform.localPosition = Vector3.zero;
        }
        if (Potrate)
        {
            addMediaHotspot.PotrateMode();
        }

        if (landscape)
        {
            addMediaHotspot.LandscapeMode();
        }

        AllHotspotTemplets = addMediaHotspot.AllHotspotTemplets;
        if (gameObject.transform.parent.gameObject.GetComponent <helpActionHotspot> ())
        {
            for (int j = 0; j < AllHotspotTemplets.Length; j++)
            {
                if (AllHotspotTemplets[j].gameObject.name == "HelpPanel")
                {
                    AllHotspotTemplets[j].SetActive(true);
                }
                else
                {
                    AllHotspotTemplets[j].SetActive(false);
                }
            }
        }
        else if (gameObject.transform.parent.gameObject.GetComponent <NewActionHotspot> ())
        {
            for (int j = 0; j < AllHotspotTemplets.Length; j++)
            {
                if (AllHotspotTemplets[j].gameObject.name == "ActionHotspotTemplet")
                {
                    AllHotspotTemplets[j].SetActive(true);
                }
                else
                {
                    AllHotspotTemplets[j].SetActive(false);
                }
            }
        }
        else
        {
            addMediaHotspot.EnableMediaHotspot();
        }
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        ActionFunction  = "MediaHotspot";
        addMediaHotspot = GameObject.Find("AddMediaHotspot").GetComponent <TriLib.Samples.AddMediaHotspot>();
        addMediaHotspot.LandscapeMode();
        targetAction = addMediaHotspot.targetAction;

        targetAction.onValueChanged.AddListener(delegate {
            if (SetupDome.SelectedHotspot == gameObject)
            {
                //	InstantiateObjects (targetObject.captionText.text);
                if (targetAction.captionText.text == "Image")
                {
                    BrowseImage = true;
                }
                else
                {
                    BrowseImage = false;
                }
            }
        });
    }