Exemplo n.º 1
0
        IEnumerator GeneratorMap()
        {
            HexGeneratorcs generator = new HexGeneratorcs();
            GameObject     obj       = new GameObject();

            obj.transform.parent = transform;
            yield return(generator.GenerateGrid(15, 15, obj.transform, movablePrefab, heightPrefab));

            HexRoom map = new HexRoom(generator.result.Cells);
        }
Exemplo n.º 2
0
 public void Initialize(HexRoom room)
 {
     this.room = room;
     gameObject.SetActive(true);
     m_MeshBounds  = gameObject.GetComponent <MeshFilter>().mesh.bounds;
     m_Highlighter = gameObject.GetComponent <Highlighter>();
     m_Renderer    = gameObject.GetComponent <Renderer>();
     if (m_Highlighter == null)
     {
         m_Highlighter = gameObject.AddComponent <Highlighter>();
     }
     m_Highlighter.overlay = false;
 }