Ejemplo n.º 1
0
 public tileData(rockData r, bool s, int m, Vector3Int p, GameObject t)
 {
     isPassable = s;
     moveCost   = m;
     rockType   = r;
     miningCost = r.hardness;
     tPos       = new Vector3Int(p.x, p.y, p.z);
     tile       = t;
 }
Ejemplo n.º 2
0
        private bool initializeRocks()
        {
            string[]  rockNames = { "Dirt", "Gypsum", "Granite", "Boundary", "None" };
            int[]     hardness  = { 5, 20, 70, 99999, 99999 };
            Color32[] colors    = { new Color32(197, 72, 28, 255), new Color32(212, 195, 183, 255), new Color32(139, 115, 132, 255), new Color32(0, 0, 0, 255), new Color32(255, 255, 255, 255) };
            int       counter   = 0;

            rocks = new rockData[rockNames.Length];
            foreach (string s in rockNames)
            {
                rocks[counter] = new rockData(s, hardness[counter], colors[counter]);
                counter++;
            }
            return(true);
        }