public void GetWeights()
        {
            var controller = new WeightController();
            var weights    = controller.Get();

            Assert.IsTrue(weights.Count > 0);
        }
Exemplo n.º 2
0
        private void SetWeightController()
        {
            oew     = new WeightTextBoxController(oewTxtBox, oewLbl);
            payload = new WeightTextBoxController(payloadTxtBox, payloadLbl);
            Zfw     = new WeightTextBoxController(zfwTxtBox, zfwLbl);
            Extra   = new WeightTextBoxController(extraFuelTxtBox, extraFuelLbl);

            WeightControl = new WeightController(oew, payload, Zfw, payloadTrackBar);
            WeightControl.Enable();
        }
Exemplo n.º 3
0
        public void ShouldAddAndRetrieveDataFromrepository()
        {
            var controller = new WeightController(new WeightRecordInMemoryRepository());

            controller.Post("user1", 80);
            controller.Post("user1", 79);
            controller.Post("user1", 78);
            controller.Post("user1", 90);

            IEnumerable <WeightRecord> weightRecords = controller.Get("user1").ToList();

            Assert.Equal(4, weightRecords.Count());
        }
Exemplo n.º 4
0
        public void ShouldAddAndRetrieveDataFromMongoDatabase()
        {
            var repository = new WeightRecordMongoRepository();
            var controller = new WeightController(repository);

            controller.Post("user1", 80);
            controller.Post("user1", 79);
            controller.Post("user1", 78);
            controller.Post("user2", 90);

            IEnumerable <WeightRecord> weightRecords = controller.Get("user1").ToList();

            Assert.Equal(3, weightRecords.Count());

            repository.DeleteRecords("user1");
            repository.DeleteRecords("user2");
        }
Exemplo n.º 5
0
    void Start()
    {
        GeneralVariables.player = gameObject;
        GeneralVariables.uiController.guiCamera.enabled = true;
        tr             = transform;
        controller     = GetComponent <CharacterController>();
        tss            = footsteps.footstepPos.GetComponent <TimeScaleSound>();
        playerMeshAnim = animations.playerMesh.GetComponent <Animation>();

        UIController uic = GeneralVariables.uiController;

        fadeSprite = uic.fadeFromBlack;
        uic.guiCamera.GetComponent <GUISway>().InitializeVariables();

        PlayerReference pr = GetComponent <PlayerReference>();

        pv = GetComponent <PlayerVitals>();
        pl = GetComponent <PlayerLook>();
        ia = pr.ia;
        wc = pr.wc;
        ac = pr.ac;
        wm = pr.wm;
        dm = pr.dm;

        defaultHeight  = controller.height;
        defaultHeadPos = head.localPosition;
        defaultLegPos  = animations.playerMesh.transform.localPosition + (Vector3.down * animations.meshOffset);
        normalLimit    = Mathf.Cos(controller.slopeLimit * Mathf.Deg2Rad);
        curSpeed       = movement.runSpeed;
        jumpTime       = -0.25f;
        impactMod      = 1f;
        fDmgSpeedMult  = 1f;

        AntiHackSystem.ProtectFloat("runSpeed", movement.runSpeed);
        AntiHackSystem.ProtectFloat("sprintSpeed", movement.sprintSpeed);
        AntiHackSystem.ProtectFloat("crouchSpeed", movement.crouchSpeed);
        AntiHackSystem.ProtectFloat("walkSpeed", movement.walkSpeed);
        AntiHackSystem.ProtectFloat("jumpHeight", movement.jumpHeight);

        grounded = false;
        movement.crouchDetection.gameObject.SetActive(false);
        AudioSource.PlayClipAtPoint(initializeSound, footsteps.footstepPos.transform.position, 0.12f);
        StartCoroutine(FadeFromBlack());
    }
Exemplo n.º 6
0
    void Start()
    {
        tr = transform;
        settingsController = GameSettings.settingsController;
        pm = GetComponent <PlayerMovement>();

        PlayerReference pr = GeneralVariables.playerRef;

        ac = pr.ac;
        wc = pr.wc;
        wm = pr.wm;

        defHeadRot          = head.localEulerAngles;
        xRot                = tr.localEulerAngles.y;
        aimMouseModifier    = 1f;
        magnificationFactor = 1f;
        availBreath         = 100f;
        deepBreathSway      = 1f;
        canBreath           = true;
    }
Exemplo n.º 7
0
 public PatientPersonalDataViewComponent(ServerIP IPConfig, JsonStructure jsonStructureConfig)
     : base(IPConfig, jsonStructureConfig)
 {
     //ActivitySummaryController = new ActivitySummaryController(IPConfig, jsonStructureConfig);
     WeightController = new WeightController(IPConfig, jsonStructureConfig);
 }
Exemplo n.º 8
0
    void Start()
    {
        base.isLocalPlayer = true;
        GeneralVariables.cachedSpectCam = cachedSpectCam;
        uic       = GeneralVariables.uiController;
        rattleTSS = equipmentRattleSource.GetComponent <TimeScaleSound>();

        healthBar         = uic.healthBar;
        healthText        = uic.healthText;
        shieldBar         = uic.shieldBar;
        shieldText        = uic.shieldText;
        staminaBar        = uic.staminaBar;
        shieldTexture     = uic.shieldTexture;
        ne                = uic.guiCamera.GetComponent <NoiseEffect>();
        disE              = uic.guiCamera.GetComponent <DistortionEffect>();
        staminaBackground = staminaBar.backgroundWidget;
        defStaminaBGCol   = staminaBackground.color;
        bloodyScreen      = uic.bloodyScreen;
        flickeringGUI     = uic.flickeringPanels;
        sa                = uic.screenAdjustment;

        bloodyScreen.material.color = DarkRef.SetAlpha(bloodyScreen.material.color, 0f);

        PlayerReference pr = GeneralVariables.playerRef;

        pm         = GetComponent <PlayerMovement>();
        playerLook = GetComponent <PlayerLook>();
        vignetting = cam.GetComponent <VignettingC>();

        damageBreathBoost  = 0f;
        ne.grainIntensity  = 0f;
        disE.baseIntensity = 0f;
        guiSizeModH        = guiSizeModS = 1f;
        healthBar.value    = 0f;
        shieldBar.value    = 0f;
        breathFactor       = 1f;
        hearingPenalty     = 1f;
        standardFreq       = 5000f;

        wm = pr.wm;
        wc = pr.wc;

        shieldAlpha      = 0f;
        finalShAlpha     = 0f;
        flickerIntensity = 0.5f;
        percent          = 1f;
        shPercent        = 1f;
        recovering       = true;
        canSprint        = true;
        initTime         = Time.time;

        damageIDs       = new List <byte>();
        damageInflicted = new List <int>();
        killerID        = -1;
        headID          = -1;
        lastWeaponID    = -1;
        builtData       = "";

        //Initialize values.
        curHealth = maxHealth;
        curShield = maxShield;
        AntiHackSystem.ProtectInt("maxHealth", maxHealth);
        AntiHackSystem.ProtectInt("maxShield", maxShield);

        oldHealth = curHealth;
        oldShield = curShield;
    }