Really all that text file stuff is creating an array based on a text file.
So all you need is an array to store where your walls are, lets say free space to move to = 0 and a wall = 1.
using UnityEngine;
using System.Collections;
public class MapArray : MonoBehaviour {
public int[,] mapArray = new int[6,6] {
{1, 1, 0, 1, 1, 1},
{1, 0, 0, 1, 0, 1}, // start point xPos = 1 (this line) yPos = 4 (5th number)
{1, 0, 1, 1, 0, 1},
{1, 0, 1, 0, 0, 1},
{1, 0 ,0, 0 ,1, 1},
{1, 1, 1, 1, 1, 1}
};
private int xPos;
private int yPos;
void Start()
{
xPos = 1;
yPos = 4;
Debug.Log ("Starting on a point that == " + mapArray[xPos,yPos]);
}
}
Basic I know but before you move onto the next place check that place == 0 and not 1. You’ll need to establish which way you’re facing but if you intend to move down then check mapArray[xPos + 1, yPos] and if = 0 move, if = 1 don’t move.
You could also add other numbers that reference traps or gold. Sorry I’m not familiar with Eye of the Beholder so don’t know if you want those things in your game.