Example #1
0
    private void CreateCubeByYLess()
    {
        int _createY = m_oldLandY - m_labdY - 1;

        for (int j = m_nowLandX - m_labdX; j <= m_nowLandX + m_labdX; j++)
        {
            Transform _cude     = CreateCude(j, -2, _createY);
            cubeLand  _cubeLand = _cude.gameObject.AddComponent <cubeLand>();
            _cubeLand.SetSubeLandInfo(j, _createY);
            m_landList.Add(_cubeLand);
        }
    }
Example #2
0
    private void CreateCubeByXBigger()
    {
        int _createX = m_oldLandX + m_labdX + 1;

        for (int j = m_nowLandY - m_labdY; j <= m_nowLandY + m_labdY; j++)
        {
            Transform _cude     = CreateCude(_createX, -2, j);
            cubeLand  _cubeLand = _cude.gameObject.AddComponent <cubeLand>();
            _cubeLand.SetSubeLandInfo(_createX, j);
            m_landList.Add(_cubeLand);
        }
    }
Example #3
0
 private void InitLand()
 {
     for (int i = 0 - m_labdX; i <= m_labdX; ++i)
     {
         for (int j = 0 - m_labdY; j <= m_labdY; ++j)
         {
             Transform _cude     = CreateCude(i, -2, j);
             cubeLand  _cubeLand = _cude.gameObject.AddComponent <cubeLand>();
             _cubeLand.SetSubeLandInfo(i, j);
             m_landList.Add(_cubeLand);
         }
     }
 }