using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlaneManager : MonoBehaviour { public static PlaneManager instance; private GameObject airplane; public int PlayerHP; private GameObject bigbang; // Use this for initialization private void Awake() { instance = this; } void Start () { // CreateAirPlane(); } public void CreateAirPlane() { //生成飞机 找到飞机预设物 实例化 给飞机设定坐标 airplane = Resources.Load("Prefabs/AirPlane"); GameObject go = Instantiate(airplane); go.transform.position = new Vector3(-0.02f,0.595f,6.29f); } public void CreateBigBang() { bigbang = Resources.Load("Prefabs/bigbang"); GameObject go = Instantiate(bigbang); go.transform.position = new Vector3(0f,0.595f,0.6f); } // Update is called once per frame void Update () { } }