Ejemplo n.º 1
0
        public BlockInfo(TextAsset file)
        {
            blocks = new Dictionary <string, BlockProperties>();

            string[] fileLines = file.text.Split('\n');
            foreach (string line in fileLines)
            {
                BlockProperties b = new BlockProperties(line);
                blocks.Add(b.GetName(), b);
            }
        }
Ejemplo n.º 2
0
 public Vector3[] GetBlockExtents(string blockName)
 {
     if (blocks.ContainsKey(blockName))
     {
         BlockProperties b = blocks[blockName];
         return(b.GetExtents());
     }
     else
     {
         Vector3[] defaultExtents = { Vector3.zero };
         return(defaultExtents);
     }
 }