public IAMF Create(AMFRequirements vehicleReqs) { switch (vehicleReqs.wingCount) { case 0: return(new Penguin(vehicleReqs.bMoving)); case 2: return(new Morgana(vehicleReqs.bMoving)); case 4: return(new Kayle_11(vehicleReqs.bMoving)); default: return(new Penguin(vehicleReqs.bMoving)); } }
public IAMF Create(AMFRequirements vehicleReqs) { switch (vehicleReqs.wingCount) { case 0: return(new Car(vehicleReqs.bMoving)); case 2: return(new Bird(vehicleReqs.bMoving)); case 4: return(new Helicopter(vehicleReqs.bMoving)); default: return(new Car(vehicleReqs.bMoving)); } }
public IAMF Create(AMFRequirements vehicleReqs) { switch (vehicleReqs.wingCount) { case 0: return(new Croc(vehicleReqs.bMoving)); case 2: return(new Bird(vehicleReqs.bMoving)); case 4: return(new Red_Kayle(vehicleReqs.bMoving)); default: return(new Croc(vehicleReqs.bMoving)); } }
public AMFFactory(AMFRequirements vehicleReqs) { Debug.Log(vehicleReqs.wingCount); _factory = vehicleReqs.amfType switch //what { AMFType.Animal => (IAMFFactory) new AMFAnimal(), AMFType.Mechanical => (IAMFFactory) new AMFMechanical(), AMFType.Failure => (IAMFFactory) new AMFFailure(), }; Debug.Log(vehicleReqs.wingCount); _requirements = vehicleReqs; //Limit checks _requirements.wingCount = Mathf.Max(0, vehicleReqs.wingCount); }
private static IAMF GetAMF(AMFRequirements reqs) { AMFFactory _factory = new AMFFactory(reqs); return(_factory.Create()); }