using UnityEngine;
//使用UI->Text 必须要增加头文件 UnityEngine.UI;
using UnityEngine.UI;public class GameManager : MonoBehaviour {
public static GameManager Instance = null;
int m_ammo = 100; //弹药数量
int m_score = 0;//游戏得分
static int m_hiscore = 0;//游戏最高得分
Player m_player; //游戏主角
//UI文字
Text txt_ammo;
Text txt_hiscore;
Text txt_life;
Text txt_score;
// Use this for initialization
void Start () {
Instance = this;
//获得主角
m_player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
/*