Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        //Debug.Log(heatMap[startY * 424 + startX]);

        //Timer delay
        timer += Time.deltaTime;
        if (timer > delay)
        {
            //Debug.Log("tick");
            timer = 0f;
        }
        else
        {
            return;
        }

        //Draw a new heat map according to obsticle map and destination
        finalMap = sdv.getMap();


        if (doingStuff == false)
        {
            DrawHeatMap();
        }
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        //Debug.Log(heatMap[startY * 424 + startX]);

        //Timer delay
        timer += Time.deltaTime;
        if (timer > delay)
        {
            timer = 0f;
        }
        else
        {
            return;
        }

        //Draw a new heat map according to obsticle map and destination
        finalMap = sdv.getMap();
        //waterMap = sdv.getMap();
        landMap = sdv.getLandMap();

        //waterMapCount = waterMap.Length;
        //waterMapCountTrue = 0;

        /*
         * foreach (bool b in waterMap)
         * {
         *  if (b == true)
         *  {
         *      //waterMapCountTrue++;
         *  }
         * }*/

        if (doingStuff == false)
        {
            DrawHeatMap();
        }
    }