切换枪下了一个脚本
GameController.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GameController : MonoBehaviour {
// 装炮的数组
public GameObject[] gunObjects;
// text
public Text shootCostText;
// 当前使用的是什么等级的子弹
private int costIndex = 0;
// 一次射击消耗的金币,造成的伤害
private