少年修仙传客户端代码仓库
leonard Wu
2018-08-02 a38909a99dd4108c110611a3575122fe77915a99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using UnityEngine;
using System.Collections;
 
public class PaintMapLine : MonoBehaviour
{
    public int row = 100;
    public int column = 100;
    public float size = .5f;
    public float y = 0;
 
    // Update is called once per frame
    void Update()
    {
        Vector3 _start;
        Vector3 _end;
 
        for (int i = 0; i < row + 1; ++i)
        {
            _start = new Vector3(0, y, i * size);
            _end = new Vector3(column, y, i * size);
 
            Debug.DrawLine(_start, _end, Color.black);
        }
 
        for (int i = 0; i < column + 1; ++i)
        {
 
            _start = new Vector3(i * size, y, 0);
            _end = new Vector3(i * size, y, row);
 
            Debug.DrawLine(_start, _end, Color.black);
        }
 
    }
}