示例#1
0
 public GetAllMaturityLevelsSteps(
     TestHost testHost,
     MaturityLevelDataHelper maturityLevelDataHelper,
     MaturityCategoryDataHelper maturityCategoryDataHelper
     )
 {
     this.testHost = testHost;
     this.maturityLevelDataHelper    = maturityLevelDataHelper;
     this.maturityCategoryDataHelper = maturityCategoryDataHelper;
     this.beltLevel   = BeltType.White;
     this.description = "Must have attended 3 security conferences.";
 }
        public async Task <Guid> CreateMaturityLevelAsync(Guid maturityCategoryId, BeltType beltLevel, string description)
        {
            var requestBody = new Dictionary <string, object>()
            {
                { "MaturityCategoryId", maturityCategoryId },
                { "BeltLevel", beltLevel },
                { "Description", description }
            };

            var responseMessage = await this.TestHost.PostAsync("/maturity-levels", requestBody);

            var locationFragments = responseMessage.Headers.Location.OriginalString.Split("/");

            return(Guid.Parse(locationFragments[2]));
        }
示例#3
0
        private async Task <IEnumerable <Guid> > CreateMaturityLevels(int count, BeltType beltType)
        {
            var recordIds = new List <Guid>();

            for (int i = 0; i < count; i++)
            {
                recordIds.Add
                (
                    await this.maturityLevelDataHelper.CreateMaturityLevelAsync
                    (
                        this.maturityCategoryId,
                        beltType,
                        "Test"
                    )
                );
            }

            return(recordIds);
        }
示例#4
0
 public Piece(BeltType type)
 {
     Type = type;
 }
示例#5
0
    // CREATION OF UNIT PARAMS
    private UnitParams CreateUnitParams(BeltType beltType, int parentPoleID)
    {
        UnitParams unitParams = null;

        switch (beltType)
        {
        case BeltType.gun:
            unitParams = new UnitParams()
            {
                clashPrefab                    = mediumClashPrefab,
                unitSound                      = gunShotSound,
                unitReloaded                   = gunReloaded,
                unitSoundVolume                = 0.8f,
                firePeriod                     = 2f,
                fireSpreadAngle                = 1f,
                projectileSpeed                = 3f,
                projectileAccelleration        = 0,
                projectileDamageProbability    = 90,
                explosionDamage                = 0,
                explosionRadius                = 0,
                explosionLightRadius           = 1,
                explosionLightIntensity        = 10,
                explosionLightDuration         = 0.5f,
                travelTime                     = 10,
                travelDistance                 = 200,
                energyConsumptionPerProjectile = 0,
                energyConsumptionPerSecond     = 0,
                recoil = 0.05f
            };
            break;

        case BeltType.machinegun:
            unitParams = new UnitParams()
            {
                clashPrefab                    = smallClashPrefab,
                unitSound                      = machinegunShotSound,
                unitSoundVolume                = 0.3f,
                firePeriod                     = 0.3f,
                fireSpreadAngle                = 2,
                projectileSpeed                = 2f,
                projectileAccelleration        = 0,
                projectileDamageProbability    = 10,
                explosionDamage                = 0,
                explosionRadius                = 0,
                explosionLightRadius           = 0.5f,
                explosionLightIntensity        = 6,
                explosionLightDuration         = 0.3f,
                travelTime                     = 5,
                travelDistance                 = 100,
                energyConsumptionPerProjectile = 0,
                energyConsumptionPerSecond     = 0,
                recoil = 0.007f
            };
            break;

        case BeltType.rocket:
            unitParams = new UnitParams()
            {
                clashPrefab                    = mediumClashPrefab,
                unitSound                      = rocketShotSound,
                unitSoundVolume                = 0.8f,
                firePeriod                     = 1.5f,
                projectileSpeed                = 2,
                projectileMaxSpeed             = 5,
                projectileAccelleration        = 0.05f,
                projectileDamageProbability    = 150,
                explosionDamage                = 0,
                explosionRadius                = 0,
                explosionLightRadius           = 10,
                explosionLightIntensity        = 50,
                explosionLightDuration         = 1.5f,
                travelTime                     = 5,
                travelDistance                 = 100,
                energyConsumptionPerProjectile = 0,
                energyConsumptionPerSecond     = 0,
                recoil = 0.05f
            };
            break;

        case BeltType.plasma:
            break;

        case BeltType.grenadelauncher:
            break;

        case BeltType.railgun:
            break;

        case BeltType.missile:
            break;

        case BeltType.autotracking_lasers:
            break;

        case BeltType.shield:
            break;

        case BeltType.radar:
            break;

        default:
            break;
        }

        unitParams.parentPoleID = parentPoleID;
        return(unitParams);
    }
示例#6
0
    // ********************************************************************************************************
    // PARAMS CREATION ****************************************************************************************
    // ********************************************************************************************************


    // CREATION OF BELT PARAMS
    private BeltParams CreateBeltParams(BeltType beltType, BeltSide beltSide, int parentPoleID)
    {
        BeltParams beltParams = null;

        switch (beltType)
        {
        case BeltType.gun:
            beltParams = new BeltParams()
            {
                beltMaxSpin       = 1.5f,
                beltMinSpin       = 0.1F,
                beltSpinPrecision = 1f,
                unitMaxSpin       = 1.5f,
                unitSpinPrecision = 1f,
                unitMinAngle      = -30,
                unitMaxAngle      = 30,
            };
            break;

        case BeltType.machinegun:
            beltParams = new BeltParams()
            {
                beltMaxSpin       = 2f,
                beltMinSpin       = 0.1F,
                beltSpinPrecision = 0.1f,
                unitMaxSpin       = 2f,
                unitSpinPrecision = 0.1f,
                unitMinAngle      = -45,
                unitMaxAngle      = 45,
            };
            break;

        case BeltType.rocket:
            beltParams = new BeltParams()
            {
                beltMaxSpin       = 1f,
                beltMinSpin       = 0.1F,
                beltSpinPrecision = 3f,
                unitMaxSpin       = 1f,
                unitSpinPrecision = 3f,
                unitMinAngle      = -20,
                unitMaxAngle      = 20,
            };
            break;

        case BeltType.plasma:
            break;

        case BeltType.grenadelauncher:
            break;

        case BeltType.railgun:
            break;

        case BeltType.missile:
            break;

        case BeltType.autotracking_lasers:
            break;

        case BeltType.shield:
            break;

        case BeltType.radar:
            break;

        default:
            break;
        }

        beltParams.type = beltType;
        beltParams.side = beltSide;
        return(beltParams);
    }