Esempio n. 1
0
 public void EquipWeapon(string name)
 {
     if (Weapons.ContainsKey(name))
     {
         m_weapon = Weapons[name];
         Console.WriteLine("Player equip " + name);
     }
 }
Esempio n. 2
0
 public void SetWeapon(Weapon weapon)
 {
     m_weapon = weapon;
 }
Esempio n. 3
0
        public void AddWeapon(Weapon weapon)
        {
            if(!Weapons.ContainsKey(weapon.Name))
            {
                Weapons.Add(weapon.Name, weapon);
            }

            if (m_weapon == null)
            {
                EquipWeapon(weapon.Name);
            }
        }