Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mrpeaks

Pages: [1]
1
Hey everyone! my sorry for asking you guys, but i'm completely lost with ngui :/ my goal is to create a hud for a spaceship game. I have an standard unity text-gui running and would like to know how i can "transfer" the "data" from unity gui to ngui text label.  ( For example Ammo and it's value.) here's a code snipped:

  1. void OnGUI(){
  2.                 GUI.skin = Holographic;
  3.                 if(!weaponManager || currentWeapon>weaponManager.WeaponLists.Length)
  4.                         return;
  5.                
  6.                 GUI.skin.label.fontSize = 15;
  7.                 if(!weaponManager.WeaponLists[currentWeapon].InfinityAmmo){
  8.                         GUI.Label(new Rect(10,70,300,50),"Ammo"+weaponManager.WeaponLists[currentWeapon].Ammo+" / "+weaponManager.WeaponLists[currentWeapon].AmmoMax);
  9.                 }else{
  10.                         GUI.Label(new Rect(20,70,300,50),"Infinity ammo");
  11.                 }
  12.                 GUI.skin.label.fontSize = 15;
  13.                 GUI.Label(new Rect(20,40,300,50),""+weaponManager.WeaponLists[currentWeapon].name);
  14.                
  15.        
  16.         }

any help is welcome  :'(

Pages: [1]