예제 #1
0
    void Start()
    {
        api        = new ApiCom();
        parentZone = GetComponentInParent <WindStreetScript>();

        //getting the perimiter points of zones-- dosnt translate to global world space yet
        Invoke("outputPoints", 1);
    }
    // Use this for initialization
    void Start()
    {
        predictionAge = DateTime.Now;
        api           = new ApiCom();
        arrow         = transform.GetChild(0).GetComponent <SpriteRenderer>();
        // start recurring meathode call for fetching a apply prediction value to wind data vis child object

        if (getPrediction)
        {
            InvokeRepeating("updateWindVis", 3f, dataUpdateRate);
        }
        else
        {
            arrow.enabled = false;
        }

        InvokeRepeating("updateArrowColor", 0f, 0.2f);
    }
    private int dataUpdateRate;     // seconds

    void Start()
    {
        api = new ApiCom();

        // set wind script object
        globalWindScript = GameObject.FindGameObjectWithTag("GlobalWind").GetComponent <GlobalWindScript>();

        dataUpdateRate = globalWindScript.dataUpdateRate;

        if (uploadDataToApi)
        {
            InvokeRepeating("UploadData", 0.3f, dataUpdateRate);
        }


        // set update rate of zones data
        InvokeRepeating("UpdateWindData", 0.1f, dataUpdateRate);

        transform.GetChild(1).GetComponent <StreetRenderScript>().setStreetRender(streetWidth, streetDirection);
    }
예제 #4
0
 void Start()
 {
     globalWindScript = GameObject.FindGameObjectWithTag("GlobalWind").GetComponent <GlobalWindScript>();
     api = new ApiCom();
 }