示例#1
0
 void Awake()
 {
     cam      = Camera.main;
     offsetX  = 0;
     dirs [0] = new Vector3(-offsetX, 0, 0);
     dirs [1] = new Vector3(Screen.width + offsetX, 0, 0);
     dirs [2] = new Vector3(-offsetX, Screen.height, 0);
     dirs [3] = new Vector3(Screen.width + offsetX, Screen.height, 0);
     terrain  = GameObject.FindGameObjectWithTag("Terrain").GetComponent <InfinitTerrain>();
 }
示例#2
0
 void Start()
 {
     terrain = GameObject.FindGameObjectWithTag("Terrain").GetComponent <InfinitTerrain>();
 }