コード例 #1
0
ファイル: GarageUI.cs プロジェクト: MorShaul/Garage
        public static void SetColor(Vehicles io_Vehicle)
        {
            Utils.ColorCars color;
            System.Type     vehicleType       = io_Vehicle.GetType();
            PropertyInfo    colorPropertyInfo = vehicleType.GetProperty("ColorCar");

            if (colorPropertyInfo != null)
            {
                color = GarageUI.GetColor();
                colorPropertyInfo.SetValue(io_Vehicle, color, null);
            }
        }