标签:
1 using UnityEngine; 2 using System.Collections; 3 4 public class MoveTrigger : MonoBehaviour { 5 6 public Transform currentBg; 7 public pipe pipe01; 8 public pipe pipe02; 9 10 void OnTriggerEnter(Collider other) { 11 if (other.tag == "Player") { 12 Transform firstBg = GameMangger._intance.firstBg; 13 currentBg.position = new Vector3(firstBg.position.x + 10, 14 currentBg.position.y, currentBg.position.z); 15 16 GameMangger._intance.firstBg = currentBg; 17 pipe01.RandomGeneratePosition(); 18 pipe02.RandomGeneratePosition(); 19 } 20 } 21 }
标签:
原文地址:http://www.cnblogs.com/wry524/p/4947821.html