コード例 #1
0
        public VehicleEquipModel(int id) : base(id)
        {
            var row = GetVehicleEquipRow();

            PartType    = row.PartType;
            Attack      = row.Attack;
            Defence     = row.Defence;
            RangeType   = row.RangeType;
            Magazine    = row.Magazine;
            Weight      = row.Weight;
            Load        = row.Load;
            MaxDefence  = row.MaxDefence;
            MaxMagazine = row.MaxMagazine;
            MaxWeight   = row.MaxWeight;

            MainHole = row.MainHole;
            SubHole  = row.SubHole;
            SEHole   = row.SEHole;

            MainGunLocation = row.MainGunLocation;
            SubGunLocation  = row.SubGunLocation;
            SEGunLocation   = row.SEGunLocation;

            CanTrans   = row.CanTrans;
            TransPrice = row.TransPrice;
            TransId    = row.TransId;
        }
コード例 #2
0
        public List <VehiclePart> GetVehicleParts(VehiclePartType partType)
        {
            var parts = Parts.Where(o => o.Type == partType);

            return(parts.ToList());
        }
コード例 #3
0
        public VehiclePart GetVehiclePart(VehiclePartType partType)
        {
            var part = Parts.Where(o => o.Type == partType).FirstOrDefault();

            return(part);
        }