// TODO: get real values
 public Weapon(WeaponInfo.Type _type)
     : base(null, new Vector2(1,1))
 {
     owner = null;
     info = Constants.Instance.getWeaponInfo(_type);
     lastShotTime = 0;
     ammoLeft = info.magSize;
 }
        public void init()
        {
            XElement weaponDoc = XElement.Load(weaponFile);
            IEnumerable<XElement> weapons = weaponDoc.Elements();
            foreach (XElement e in weapons) {
                WeaponInfo w = new WeaponInfo(e);
                weaponsInfo.Add(w.type, w);
            }

            XElement charDoc = XElement.Load(charFile);
            IEnumerable<XElement> characters = charDoc.Elements();
            foreach (XElement e in characters) {
                CharacterInfo c = new CharacterInfo(e);
                charsInfo.Add(c.type, c);
            }
        }
 public WeaponInfo getWeaponInfo(WeaponInfo.Type t)
 {
     return weaponsInfo[t];
 }