コード例 #1
0
 public void SetWeapon(WeaponBehavior weapon)
 {
     if (_availableWeapons.ContainsKey(weapon.weaponStats.weaponID))
     {
         _availableWeapons[weapon.weaponStats.weaponID].SetHolder(null);
     }
     weapon.SetHolder((weaponHolder != null) ? weaponHolder : gameObject);
     _availableWeapons[weapon.weaponStats.weaponID] = weapon;
     selected = weapon;
 }