예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        mapDrawer   = FindObjectOfType <MapDrawer>();
        foesManager = FindObjectOfType <FoesManager>();

        mapGenerator = new MapGenerator(parameters);
        grid         = new Grid(parameters, mapGenerator);

        // Instantiate base objects
        playerSpawn = Instantiate(playerSpawnPrefab, Vector3.zero, Quaternion.identity).GetComponent <PlayerSpawn>();

        mapDrawer.playerSpawnTransform = playerSpawn.transform;
        mapGenerator.PrepareMapGenerationJob();
        grid.PrepareGridUpdateJob();
        mapDrawer.DrawMapBorder();
        grid.CreateGrid();
        player.ResetPlayer();
    }