コード例 #1
0
 public Vehicle(string i_ModelName, string i_LicenseNumber, string i_Owner, string i_OwnerPhoneNumber, List <Wheel> i_wheels, EnergySystem i_energySystem)
 {
     m_LicenseNumber    = i_LicenseNumber;
     m_ModelName        = i_ModelName;
     m_OwnerName        = i_Owner;
     m_OwnerPhoneNumber = i_OwnerPhoneNumber;
     m_Wheels           = i_wheels;
     EnergySystem       = i_energySystem;
 }
コード例 #2
0
 public Motorcycle(
     ref Client i_Owner,
     VehicleType i_Type,
     string i_ModelName,
     string i_LicenseNumber,
     ref EnergySystem i_EnergySystem,
     short i_WheelsNumber,
     ref List <Wheel> i_VehicleWheels,
     int i_EngineCapacity,
     LicenseType i_LicenseType) :
     base(ref i_Owner, i_Type, i_ModelName, i_LicenseNumber, ref i_EnergySystem, i_WheelsNumber, ref i_VehicleWheels)
 {
     this.m_EngineCapacity = i_EngineCapacity;
     this.m_LicenseType    = i_LicenseType;
 }
コード例 #3
0
 public Car(
     ref Client i_Owner,
     VehicleType i_Type,
     string i_ModelName,
     string i_LicenseNumber,
     ref EnergySystem i_EnergySystem,
     short i_WheelsNumber,
     ref List <Wheel> i_VehicleWheels,
     CarColor i_CarColor,
     CarDoors i_DoorsNumber) :
     base(ref i_Owner, i_Type, i_ModelName, i_LicenseNumber, ref i_EnergySystem, i_WheelsNumber, ref i_VehicleWheels)
 {
     this.m_Color       = i_CarColor;
     this.m_DoorsNumber = i_DoorsNumber;
 }
コード例 #4
0
 public Truck(
     ref Client i_Owner,
     VehicleType i_Type,
     string i_ModelName,
     string i_LicenseNumber,
     ref EnergySystem i_EnergySystem,
     short i_WheelsNumber,
     ref List <Wheel> i_VehicleWheels,
     float i_CargoVolume,
     bool i_CargoDangerousMaterials) :
     base(ref i_Owner, i_Type, i_ModelName, i_LicenseNumber, ref i_EnergySystem, i_WheelsNumber, ref i_VehicleWheels)
 {
     this.m_CargoVolume             = i_CargoVolume;
     this.m_CargoDangerousMaterials = i_CargoDangerousMaterials;
 }
コード例 #5
0
        protected float m_PercentageOfRemainingEnergy; // calculate

        public Vehicle(
            ref Client i_Owner,
            VehicleType i_Type,
            string i_ModelName,
            string i_LicenseNumber,
            ref EnergySystem i_EnergySystem,
            short i_wheelsNumber,
            ref List <Wheel> i_Wheels)
        {
            this.m_Owner         = i_Owner;
            this.m_Type          = i_Type;
            this.m_Status        = VehicleStatus.InRepair;
            this.m_EnergySystem  = i_EnergySystem;
            this.m_ModelName     = i_ModelName;
            this.m_LicenseNumber = i_LicenseNumber;
            this.r_WheelsNumber  = i_wheelsNumber;
            this.m_PercentageOfRemainingEnergy = calculatePercentageOfRemainingEnergy();
            this.m_Wheels = i_Wheels;
        }
コード例 #6
0
 public static Vehicle CreateNewCar(
     ref Client i_Owner,
     Vehicle.VehicleType i_Type,
     string i_ModelName,
     string i_LicenseNumber,
     ref EnergySystem i_EnergySystem,
     short i_WheelsNumber,
     ref List <Wheel> i_Wheels,
     Car.CarColor i_CarColor,
     Car.CarDoors i_DoorsNumber)
 {
     return(new Car(
                ref i_Owner,
                i_Type,
                i_ModelName,
                i_LicenseNumber,
                ref i_EnergySystem,
                i_WheelsNumber,
                ref i_Wheels,
                i_CarColor,
                i_DoorsNumber));
 }
コード例 #7
0
 public static Truck CreatNewTruck(
     ref Client i_Owner,
     Vehicle.VehicleType i_Type,
     string i_ModelName,
     string i_LicenseNumber,
     ref EnergySystem i_EnergySystem,
     short i_WheelsNumber,
     ref List <Wheel> i_Wheels,
     float i_CargoVolume,
     bool i_CargoDangerousMaterials)
 {
     return(new Truck(
                ref i_Owner,
                i_Type,
                i_ModelName,
                i_LicenseNumber,
                ref i_EnergySystem,
                i_WheelsNumber,
                ref i_Wheels,
                i_CargoVolume,
                i_CargoDangerousMaterials));
 }
コード例 #8
0
 public static Motorcycle CreateNewMotorcycle(
     ref Client i_Owner,
     Vehicle.VehicleType i_Type,
     string i_ModelName,
     string i_LicenseNumber,
     ref EnergySystem i_EnergySystem,
     short i_WheelsNumber,
     ref List <Wheel> i_Wheels,
     int i_EngineCapacity,
     Motorcycle.LicenseType i_LicenseType)
 {
     return(new Motorcycle(
                ref i_Owner,
                i_Type,
                i_ModelName,
                i_LicenseNumber,
                ref i_EnergySystem,
                i_WheelsNumber,
                ref i_Wheels,
                i_EngineCapacity,
                i_LicenseType));
 }
コード例 #9
0
ファイル: Truck.cs プロジェクト: karenmeltvik/GarageLogic1
 public Truck(string i_ModelName, string i_LicenseNumber, string i_OwnerName,
              string i_OwnerPhoneNumber, List <Wheel> i_wheels, bool i_IsCooled, float i_CargoVolume, EnergySystem i_energySystem)
     : base(i_ModelName, i_LicenseNumber, i_OwnerName, i_OwnerPhoneNumber, i_wheels, i_energySystem)
 {
     m_IsCooled    = i_IsCooled;
     m_CargoVolume = i_CargoVolume;
     EnergySystem  = new FuelBase(EnergySystem.MaxAmountOfEnergy, eFuelType.Solar); // set somehow
 }
コード例 #10
0
ファイル: Car.cs プロジェクト: karenmeltvik/GarageLogic1
 public Car(string i_ModelName, string i_LicenseNumber, string i_OwnerName,
            string i_OwnerPhoneNumber, List <Wheel> i_wheels, eColor i_CarColor, eNumOfDoors i_NumOfDoors, EnergySystem i_energySystem)
     : base(i_ModelName, i_LicenseNumber, i_OwnerName, i_OwnerPhoneNumber, i_wheels, i_energySystem)
 {
     m_CarColor   = i_CarColor;
     m_NumOfDoors = i_NumOfDoors;
 }
コード例 #11
0
 public Motorcycle(string i_ModelName, string i_LicenseNumber, string i_OwnerName,
                   string i_OwnerPhoneNumber, List <Wheel> i_wheels, eLicenseType i_licenseType, int i_engineVolume, EnergySystem i_energySystem)
     : base(i_ModelName, i_LicenseNumber, i_OwnerName, i_OwnerPhoneNumber, i_wheels, i_energySystem)
 {
     m_LicenseType  = i_licenseType;
     m_EngineVolume = i_engineVolume;
 }