33 lines
582 B
C#
33 lines
582 B
C#
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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 切换上帝模式
|
|
/// </summary>
|
|
/// <param name="god"></param>
|
|
public void God(bool god)
|
|
{
|
|
gameObject.SetActive(!god);
|
|
}
|
|
}
|