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); } }
public void GetWeapon(WeaponType type){ WeaponStoreCtrl.StoreWeapon (type, 1); }
void TakeAndDispatchWeapon(WeaponType type){ if (WeaponStoreCtrl.TakeWeapon (type)) { weaponDispatcher.DispatchWeapon (type); } }
void ResetStaticComponents() { ScoreCtrl.Reset(); WeaponStoreCtrl.Reset(); }