Пример #1
0
    void SetupRoom()
    {
        m_Background.sprite = m_RoomConfig.getBackround();

        if (m_CellBase)
        {
            m_CellCount = m_RoomConfig.getCellCount();
            if (m_CellCount == 0)
            {
                m_Cells = null;
            }
            else
            {
                Transform parent = m_CellBase.transform.parent;
                m_Cells = new List <UICell>();


                for (int j = 1; j < getRow() - 1; j++)
                {
                    for (int i = 1; i < getColumn() - 1; i++)
                    {
                        InstantiateCell(i, j, UIItem.eType.None);
                    }
                }
            }
            m_CellBase.gameObject.SetActive(false);

            ApplyRandomDamageToAllCell();

            AddDoors();

            GenerateLogicGrid();

            /*
             * if (d_HeroesAI)
             * {
             *  List<Pathfinding.ObjectPathData> found_Object = Pathfinding.FindAccessibleObjects(m_IAGrid, new Vector2Int(0, 5));
             *
             *  if (found_Object.Count > 0)
             *  {
             *      StartCoroutine(d_HeroesAI.Move(found_Object[0].path, this, 0.5f));
             *  }
             * }*/
        }
    }