/// <summary>
        /// 타일 맵 가장 자리에 타일 인덱스를 표시한다.
        /// </summary>
        private void CreateBorderTileIndex()
        {
            // 상
            for (int x = m_Bounds.xMin; x < m_Bounds.xMax; x++)
            {
                GameObject tileIndex = Instantiate(m_TileIndexPrefab, this.transform) as GameObject;
                tileIndex.transform.position = new Vector3(x + 0.5f, m_Bounds.yMax + 0.5f, 0f);
                NumberRenderer tileIndexNumber = tileIndex.GetComponent <NumberRenderer>();
                tileIndexNumber.RenderNumber(Mathf.Abs(x));

                m_TileIndexRenderers.Add(tileIndexNumber);
            }

            // 하
            for (int x = m_Bounds.xMin; x < m_Bounds.xMax; x++)
            {
                GameObject tileIndex = Instantiate(m_TileIndexPrefab, this.transform) as GameObject;
                tileIndex.transform.position = new Vector3(x + 0.5f, m_Bounds.yMin - 0.5f, 0f);
                NumberRenderer tileIndexNumber = tileIndex.GetComponent <NumberRenderer>();
                tileIndexNumber.RenderNumber(Mathf.Abs(x));

                m_TileIndexRenderers.Add(tileIndexNumber);
            }

            // 좌
            for (int y = m_Bounds.yMin; y < m_Bounds.yMax; y++)
            {
                GameObject tileIndex = Instantiate(m_TileIndexPrefab, this.transform) as GameObject;
                tileIndex.transform.position = new Vector3(m_Bounds.xMin - 0.5f, y + 0.5f, 0f);
                NumberRenderer tileIndexNumber = tileIndex.GetComponent <NumberRenderer>();
                tileIndexNumber.RenderNumber(Mathf.Abs(y));

                m_TileIndexRenderers.Add(tileIndexNumber);
            }

            // 우
            for (int y = m_Bounds.yMin; y < m_Bounds.yMax; y++)
            {
                GameObject tileIndex = Instantiate(m_TileIndexPrefab, this.transform) as GameObject;
                tileIndex.transform.position = new Vector3(m_Bounds.xMax + 0.5f, y + 0.5f, 0f);
                NumberRenderer tileIndexNumber = tileIndex.GetComponent <NumberRenderer>();
                tileIndexNumber.RenderNumber(Mathf.Abs(y));

                m_TileIndexRenderers.Add(tileIndexNumber);
            }
        }
示例#2
0
 // Use this for initialization
 void Start()
 {
     mapManager = GetComponent <MapManager>();
     //This is the main render function. Give this fuction the number you want to render.
     signLevel.RenderNumber(mapManager.mapNumber);
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     //This is the main render function. Give this fuction the number you want to render.
     theScore.RenderNumber(0);
 }
示例#4
0
 public void Start()
 {
     numStar = 0;
     numberRenderer.RenderNumber(numStar);
 }