예제 #1
0
    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));
        }
    }
예제 #2
0
    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));
        }
    }
예제 #3
0
    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));
        }
    }
예제 #4
0
    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);
    }
예제 #5
0
    private static IAMF GetAMF(AMFRequirements reqs)
    {
        AMFFactory _factory = new AMFFactory(reqs);

        return(_factory.Create());
    }