August 2018
Beginner
334 pages
10h 19m
English
We will comprise everything in just a class that will handle the abstract representation, called DSFDungeon:
using UnityEngine;using System.Collections.Generic;public class DFSDungeon : MonoBehaviour{ public int width; public int height; public bool[,] dungeon; public bool[,] visited; private Stack<Vector2> stack; private Vector2 current; private int size; // next steps}
private void Init(){ // next steps }
stack = new Stack<Vector2>();size = width * height;dungeon = new bool[height, width];visited = new bool[height, width];current.x = Random.Range(0, width - 1);current.y ...
Read now
Unlock full access