コード例 #1
0
 void Start()
 {
     g    = gun.GetComponent <gun>();
     ammo = g.getAmmo();
     //healthBar = GameObject.Find("Ammunition").GetComponent<HealthBarController>();
     t = GetComponent <Text>();
 }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     ammo   = g.getAmmo();
     t.text = ammo.ToString();
 }
コード例 #3
0
 // Update is called once per frame
 void Update()
 {
     ammo      = g.getAmmo();
     bar.value = ammo;
 }