Пример #1
0
 public void addNewWeapon(string objectSource,Weapon weapon)
 {
     if (weaponList == null)
         weaponList = new Dictionary<string, Weapon>();
     //Verify the type of weapon to return
     weaponList.Add(objectSource, getWeaponType(weapon));
 }
Пример #2
0
 private Weapon getWeaponType(Weapon weapon)
 {
     if (weapon is RocketLaucher)
     {
         RocketLaucher rocketLaucher = new RocketLaucher();
         rocketLaucher.init(null);
         return rocketLaucher;
     }
     return null;
 }