Пример #1
0
    public void ShowOnMap(PictureAttribute attribute)
    {
        setCollectionVisibility(false);
        ShowPictureObject.SetActive(false);

        var EventArgs = new GPSDataReceivedEventArgs(attribute.latitude, attribute.longitude, 0);

        OnShowOnMap(this, EventArgs);
        HandMenu.SetActive(false);
        HandMenuMap.SetActive(true);
        MapMenuInit();
        Debug.Log("Clicked ShowOnmap");
    }
Пример #2
0
    public void initHandMenuPictureObject(PictureAttribute attribute)
    {
        HandMenuclose_button  = transform.GetChild(2).GetChild(0).GetChild(1).GetChild(0).gameObject;
        HandMenuanchor_button = transform.GetChild(2).GetChild(0).GetChild(1).GetChild(1).gameObject;
        showOnMapButton       = transform.GetChild(2).GetChild(0).GetChild(1).GetChild(2).gameObject;

        HandMenucloseInteractable  = HandMenuclose_button.GetComponent <Interactable>();
        HandMenuanchorInteractable = HandMenuanchor_button.GetComponent <Interactable>();
        showOnMapInteractable      = showOnMapButton.GetComponent <Interactable>();

        HandMenucloseInteractable.OnClick.AddListener(PictureMenuCloseButton);
        HandMenuanchorInteractable.OnClick.AddListener(PictureMenuAnchor);
        showOnMapInteractable.OnClick.AddListener(() => ShowOnMap(attribute));

        HandMenu.SetActive(true);
    }
Пример #3
0
    public void SearchIDProvider(GameObject gameObject, List <PicturePointerData> list)
    {
        PicturePointerData result = list.Find(x => x.getGameObject() == gameObject);

        PictureAttribute attribute = result.getGameObject().GetComponent <PictureAttribute>();

        Debug.Log(attribute.latitude + " " + attribute.longitude);
        Debug.Log(result.getID() + " ID ");

        var eventArgs = new SelectResultPictureDataArgs(result);

        OnSelectPicture(this, eventArgs);

        ShowObject = Instantiate(result.getGameObject());
        ShowObject.AddComponent <ObjectManipulator>();
        ShowObject.AddComponent <NearInteractionGrabbable>();
        ShowObject.GetComponent <PointerHandler>().enabled = false;                // Disabling it otherwise other Listener will get Events
        ShowObject.transform.position = result.getGameObject().transform.position; // This position used for a smooth transition from collection to view

        ShowPictureObject = (GameObject)Resources.Load("Prefab/ShowResult", typeof(GameObject));
        ShowPictureObject = Instantiate(ShowPictureObject);
        ShowPictureObject.transform.parent = transform.parent;

        ShowPictureObject.transform.position = ShowObject.transform.position;                                                    // Get Original position from colloection for nice smooth transition

        ShowObject.transform.localScale = new Vector3(attribute.width / local_resize, attribute.height / local_resize, 0.0001f); // Setting size

        ShowObject.transform.parent = ShowPictureObject.transform;

        //ShowPictureObject.transform.GetChild(0).transform.position = result.getGameObject().transform.position;
        //ShowPictureObject.transform.GetChild(0).transform.localScale = new Vector3(0.5f,-0.3f,0.0001f);

        ShowPictureObject.GetComponent <SolverHandler>().enabled = true;
        ShowPictureObject.GetComponent <RadialView>().enabled    = true;

        RadialView radialView = ShowPictureObject.GetComponent <RadialView>();

        setImageProperties(radialView);

        setCollectionVisibility(false);

        initPictureObject();
        initHandMenuPictureObject(attribute);

        HandMenuSuperImoseInit();
        PictureMenuSuperImoseInit();
    }
Пример #4
0
    private Vector3 rxt(PictureAttribute attribute)
    {
        Vector3 res;

        if (attribute.width > 1000 || attribute.height > 700)
        {
            local_resize = 9000;
            res          = new Vector3(attribute.width / local_resize, attribute.height / local_resize, 0.01f);
        }

        else
        {
            local_resize = 2000;
            return(res = new Vector3(attribute.width / local_resize, attribute.height / local_resize, 0.01f));
        }

        return(res);
    }