123456789101112131415161718192021222324252627282930313233343536 |
- 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<GameObject>("Prefabs/AirPlane");
- GameObject go = Instantiate(airplane);
- go.transform.position = new Vector3(-0.02f,0.595f,6.29f);
- }
- public void CreateBigBang()
- {
- bigbang = Resources.Load<GameObject>("Prefabs/bigbang");
- GameObject go = Instantiate(bigbang);
- go.transform.position = new Vector3(0f,0.595f,0.6f);
- }
-
- // Update is called once per frame
- void Update () {
-
- }
- }
|