Ejemplo n.º 1
0
    public void SpawnAI(GameObject enemyToSpawn)
    {
        GameObject spawned       = Instantiate(basicAIPrefab, startNode.tileTransform.position + Vector3.up, basicAIPrefab.transform.rotation);
        BasicAI    spawnedScript = spawned.GetComponent <BasicAI>();

        spawnedScript.startNode = startNode;
        spawnedScript.endNode   = endNode;
        spawnedScript.PathThoughMaze();
    }