DestroyForTime.CS
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroyForTime : MonoBehaviour {
public float time = 1.5f;
// Use this for initialization
void Start () {
Destroy(this.gameObject,time);
}
// Update is called once per frame
void Update () {
}
}
FollowTarget.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowTarget : MonoBehaviour {
public Transform player1; //坦克 1 的 transform 组件
public Transform player2; //坦克 2 的 transform 组件
private Camera camera; //camer 组件
private Vector3 offset; //坦克中心位置和 camer 的偏移量
// Use this for initialization
void Start () {