void UpdateUI()
 {
     foreach (WeaponType type in System.Enum.GetValues(typeof(WeaponType)))
     {
         GameObject uiObject = null;
         typeToUI.TryGetValue(type, out uiObject);
         int weaponCount = WeaponStoreCtrl.GetWeaponCount(type);
         if (weaponCount > 0)
         {
             // show the weapon icon and update count
             uiObject.SetActive(true);
         }
         else
         {
             uiObject.SetActive(false);
         }
         SetUICount(uiObject, weaponCount);
     }
 }
Пример #2
0
	public void GetWeapon(WeaponType type){
		WeaponStoreCtrl.StoreWeapon (type, 1);
	}
Пример #3
0
	void TakeAndDispatchWeapon(WeaponType type){
		if (WeaponStoreCtrl.TakeWeapon (type)) {
			weaponDispatcher.DispatchWeapon (type);
		}
	}
 void ResetStaticComponents()
 {
     ScoreCtrl.Reset();
     WeaponStoreCtrl.Reset();
 }