예제 #1
0
    // We need the map and the camera
    // The camera has the map, however
    private void Start()
    {
        mainCamera = Camera.main;
        cc         = mainCamera.GetComponent <CameraController>();
        if (cc == null)
        {
            Debug.LogError("No CameraController found!");
        }

        map = cc.map;

        Block[,] layer = map.GetMapLayer(cc.DisplayZ);

        squareGrid.CreateMap(layer, map.cellCountX, map.cellCountZ);
        map.SpawnStartingCharacter();
    }