using System.Collections; using System.Collections.Generic; using UnityEngine; public class FakeMountain : MonoBehaviour { public Transform Target; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if (Target != null) { Vector3 pos = transform.position; pos.x = Target.position.x; pos.z = Target.position.z; transform.position = pos; } } /// /// 切换上帝模式 /// /// public void God(bool god) { gameObject.SetActive(!god); } }