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