Esempio n. 1
0
        public TezDungeonBlock getBlock(TezDungeonUtility.Direction dir, TezDungeonBlock current)
        {
            int x, y;

            if (this.getBlock(dir, current.x, current.y, out x, out y))
            {
                return(m_BlockArray[x, y]);
            }

            return(null);
        }
Esempio n. 2
0
        public IEnumerator create()
        {
            List <TezDungeonBlock> total = new List <TezDungeonBlock>();

            for (int y = 0; y < m_Height; y++)
            {
                for (int x = 0; x < m_Width; x++)
                {
                    m_BlockArray[x, y] = new TezDungeonBlock(x, y);
                    total.Add(m_BlockArray[x, y]);
                    onBlockFilled?.Invoke(x, y);
                }
            }

            yield return(this.createRoom(total));

            yield return(this.createMaze(total));
        }