Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     rightText   = GameObject.Find("highValue");
     leftText    = GameObject.Find("lowValue");
     booliScript = GameObject.FindWithTag("fullMap").GetComponent <BooliApi>();
     lineRendererInterval.positionCount = 2;
     lineRendererInterval.material      = new Material(Shader.Find("Particles/Multiply"));
     lineRendererInterval.SetColors(Color.blue, Color.blue);
     lineRendererRight.positionCount = 2;
     lineRendererLeft.positionCount  = 2;
     lineRendererRight.useWorldSpace = false;
     lineRendererLeft.useWorldSpace  = false;
     filteringValues = GameObject.FindWithTag("FilteringValues").GetComponent <FilteringValues>();
     rightText.GetComponent <TextMesh>().fontSize = 60;
     rightText.transform.localPosition            = new Vector3(rightText.transform.localPosition.x, rightText.transform.localPosition.y - 1, rightText.transform.localPosition.z);
     leftText.GetComponent <TextMesh>().fontSize  = 60;
     controllerLeft  = GameObject.FindWithTag("controllerLeft");
     controllerRight = GameObject.FindWithTag("controllerRight");
     head            = GameObject.FindWithTag("MainCamera");
     currentFilterText.transform.parent        = transform.parent;
     currentFilterText.transform.localPosition = new Vector3(0, -0.05f, 0);
     controllerLeft.GetComponent <VRTK_ControllerEvents>().TriggerPressed   += new ControllerInteractionEventHandler(LeftTriggerDown);
     controllerLeft.GetComponent <VRTK_ControllerEvents>().TriggerReleased  += new ControllerInteractionEventHandler(LeftTriggerUp);
     controllerRight.GetComponent <VRTK_ControllerEvents>().TriggerReleased += new ControllerInteractionEventHandler(RightTriggerUp);
     controllerRight.GetComponent <VRTK_ControllerEvents>().TriggerPressed  += new ControllerInteractionEventHandler(RightTriggerDown);
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     booliScript     = booliHolder.GetComponent <BooliApi>();
     menuScript      = menuController.GetComponent <Menu>();
     filteringValues = GameObject.FindWithTag("FilteringValues").GetComponent <FilteringValues>();
     overViewScript  = overViewHolder.GetComponent <Overview>();
     houseTypeParent.transform.localPosition = new Vector3(0, 0, 0);
     houseTypeParent.SetActive(false);
 }
Exemplo n.º 3
0
    void Start()
    {
        allLats = new List<float>();
        overview = overviewHolder.GetComponent<Overview>();
        /* booliObject = JsonConvert.DeserializeObject<bigBooliObject>(File.ReadAllText(@"c:\Users/Bamse/0.json")) */
        ;
        googleScript = googleHolder.GetComponent<GoogleApi>();
        filteringValues = GameObject.FindWithTag("FilteringValues").GetComponent<FilteringValues>();

        oldZoom = googleScript.zoom;
        List<object> allListings = new List<object>();
        StartCoroutine(go(allListings));
       
    }
Exemplo n.º 4
0
    private void DeleteAll()
    {
        i = 0;
        Destroy(listPrice);
        Destroy(numberOfrooms);
        Destroy(livingArea);
        Destroy(constructionYear);
        Destroy(plotArea);
        Destroy(priceDecrease);
        Destroy(houseType);
        Destroy(m2Price);
        Destroy(soonForSale);
        Destroy(rent);

        listPrice        = Instantiate(text, transform);
        numberOfrooms    = Instantiate(text, transform);
        livingArea       = Instantiate(text, transform);
        constructionYear = Instantiate(text, transform);
        plotArea         = Instantiate(text, transform);
        priceDecrease    = Instantiate(text, transform);
        houseType        = Instantiate(text, transform);
        m2Price          = Instantiate(text, transform);
        rent             = Instantiate(text, transform);
        filteringValues  = GameObject.FindWithTag("FilteringValues").GetComponent <FilteringValues>();

        foreach (Transform child in transform)
        {
            if (i >= 10)
            {
                child.transform.localPosition = new Vector3(child.transform.localPosition.x, child.transform.localPosition.y + i * 2 - 20, child.transform.localPosition.z);
            }
            else
            {
                child.transform.localPosition = new Vector3(child.transform.localPosition.x, child.transform.localPosition.y + i * 2, child.transform.localPosition.z);
            }
            i++;
        }

        reset = true;
    }