public Garage() { Position = new Vector3(); PedRotation = 0; Spawnpoints = new List <GarageSpawn>(); FactionType = FactionType.Citizen; Type = GarageType.GroundVehicle; }
public static GarageType Validate(GarageType value) { if (value < MyGEnum_Min) { return(MyGEnum_Min); } if (value > MyGEnum_Max) { return(MyGEnum_Max); } return(value); }
public Garage(bool isCustom, GarageType type, SheetColor sheetColor, SheetType sheetType, List <Window> windows, List <Door> doors, List <Roof> roofs, double xLength, double yLength, double zLength ) { this.IsCustom = isCustom; this.Type = type; this.SheetColor = sheetColor; this.SheetType = sheetType; this.Windows = windows; this.Doors = doors; this.Roofs = roofs; SetSize(xLength, yLength, zLength); }
public static void Main(string[] args) { //while () { try { HouseType hType = 0; Console.Write(@"Enter the type of house you want to purchase 0 - Default 1 - Single Family 2 - Townhouse 3 - lifestyle block your Choice: "); hType = Validate((HouseType)int.Parse(Console.ReadLine())); Console.WriteLine("\nGreat, you choice was: {0}", hType); } catch (System.ArgumentException) { Console.WriteLine("Invaild input, has to be between 0 - 3"); } //Garage GarageType gType = 0; Console.Write(@"Enter type of Garage you want to purchase 0 - Default 1 - Single 2 - Double 3 - 3 Car + 4 - Carport 5 - Not essential your Choice: "); gType = Validate((GarageType)int.Parse(Console.ReadLine())); Console.WriteLine("\nGreat, you choice was: {0}", gType); Console.Read(); } }
public static bool IsVehicleTypeAllowed(VehicleType vehicleType, GarageType garageType) { bool returnvalue = false; switch (vehicleType) { case VehicleType.Car: case VehicleType.Truck: case VehicleType.Motorcycle: case VehicleType.Cycles: if (garageType == GarageType.GroundVehicle) { returnvalue = true; } break; case VehicleType.Helicopter: if (garageType == GarageType.Helicopter) { returnvalue = true; } break; case VehicleType.Plane: if (garageType == GarageType.Plane) { returnvalue = true; } break; case VehicleType.Boat: if (garageType == GarageType.Boat) { returnvalue = true; } break; } return(returnvalue); }
public GarageBuilder WithGarageType(GarageType garageType) { PropertyBag.GarageType = garageType; return(this); }