Exemplo n.º 1
0
 private void Awake()
 {
     maxScore   = Mathf.CeilToInt(Mathf.Sqrt(Mathf.Pow(maxDisTarget, 2) + Mathf.Pow(maxDisTarget, 2)));
     startPos   = transform.position;
     outputSize = 2;
     if (loadSaveData)
     {
         saveData = Load();
     }
     if (!train)
     {
         testAI.gameObject.SetActive(false);
     }
 }
Exemplo n.º 2
0
    private void Awake()
    {
        if (!train)
        {
            xPos = maze.xPosStart;
            yPos = maze.yPosStart;
            visitedPoints.Add(new Vector2(xPos, yPos));
        }

        if (load)
        {
            saveData = Load();
        }

        outputSize    = 4; //each direction
        projectedMaze = maze;
        ConvertGrid(projectedMaze);
        calcX = Mathf.FloorToInt((float)Screen.width / length);
        calcY = Mathf.FloorToInt((float)Screen.height / length);
    }