Пример #1
0
    // Use this for initialization
    void Start()
    {
        Cursor.visible = false;
        values         = GameObject.FindGameObjectWithTag("Values");
        stored         = values.GetComponent <StoredValues>();
        hud            = gameObject.GetComponent <HUD>();
        run            = GetComponent <Run>();
        squat          = GetComponent <Squat>();
        jump           = GetComponent <Jump>();
        screen         = GameObject.FindGameObjectWithTag("ScreenOverlay");
        overlay        = screen.GetComponent <ScreenOverlay>();
        finish         = GameObject.FindGameObjectWithTag("Finish");

        rightBoundry = 0.4f;
        leftBoundry  = -0.4f;
        moveSideways = 7.5f;

        moveForward   = 0.0f;
        moveSpeed     = 0.125f;
        combinedSpeed = 0.0f;

        // vertical normal vector for hip angle
        hipUp = new Vector3(0.0f, 1.0f, 0.0f);

        keepRunning = false;
        begin       = false;
    }
Пример #2
0
        public async Task <IActionResult> Update(int id, [FromBody] StoredValues storedValues)
        {
            if (id != storedValues.Id)
            {
                return(BadRequest());
            }

            _context.Entry(storedValues).State = EntityState.Modified;
            await _context.Save();

            return(NoContent());
        }
Пример #3
0
 public void DeleteCurrentProfile()
 {
     if (Profiles.Count <= 1)
     {
         return;
     }
     StoredValues.Remove($"ProtocolPort.{CurrentProfile}");
     StoredValues.Remove($"NatAccess.{CurrentProfile}");
     Profiles.Remove(CurrentProfile);
     CurrentProfile = Profiles[0];
     this.OnPropertyChanged(nameof(CurrentProfile));
     LoadProfile();
     SaveCurrentProfile();
 }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        movement = gameObject.GetComponent <Movement>();
        squat    = gameObject.GetComponent <Squat>();
        values   = GameObject.FindGameObjectWithTag("Values");
        stored   = values.GetComponent <StoredValues>();

        playerHeight  = 1.0f;
        bottomDif     = 0.0f;
        floorHeight   = 1.0f;
        maxJumpHeight = 3.5f;
        jumpSpeed     = 0.25f;
        fallSpeed     = 0.175f;
        jumpThreshold = 2.0f;
        lowestFoot    = stored.lowestFoot;

        isJumping      = false;
        reachedJumpTop = false;
    }
Пример #5
0
    // Use this for initialization
    void Start()
    {
        movement = gameObject.GetComponent<Movement>();
        squat = gameObject.GetComponent<Squat>();
        values = GameObject.FindGameObjectWithTag("Values");
        stored = values.GetComponent<StoredValues>();

        playerHeight = 1.0f;
        bottomDif = 0.0f;
        floorHeight = 1.0f;
        maxJumpHeight = 3.5f;
        jumpSpeed = 0.25f;
        fallSpeed = 0.175f;
        jumpThreshold = 2.0f;
        lowestFoot = stored.lowestFoot;

        isJumping = false;
        reachedJumpTop = false;
    }
Пример #6
0
    // Use this for initialization
    void Start()
    {
        movement = GetComponent <Movement>();
        values   = GameObject.FindGameObjectWithTag("Values");
        stored   = values.GetComponent <StoredValues>();

        runSpeed     = 0.0f;
        lastRunSpeed = 0.0f;
        vel          = 0.1f;

        maxSteps   = 30;
        leftSteps  = new double[maxSteps];
        rightSteps = new double[maxSteps];

        jump     = GetComponent <Jump>();
        movement = GetComponent <Movement>();
        hud      = GetComponent <HUD>();

//		yBottom = ;
    }
Пример #7
0
    // Use this for initialization
    void Start()
    {
        initText   = GameObject.Find("InitText").GetComponent <Text>();
        kneeAngles = GameObject.Find("KneeAngles").GetComponent <Text>();
        countDown  = GameObject.Find("CountDown").GetComponent <Text>();
        values     = GameObject.FindGameObjectWithTag("Values");
        stored     = values.GetComponent <StoredValues>();

        noUser         = "";
        straightKnees  = "";
        inRange        = "";
        groundedFeet   = "";
        countDown.text = "";

        distanceBool     = false;
        angleBool        = false;
        groundedBool     = false;
        coroutineStarted = false;
        delayBusy        = false;

        yBottom = 0f;
    }
 public bool SetValues([FromBody] StoredValues values)
 {
     storedValues = values;
     return(true);
 }
Пример #9
0
    // Use this for initialization
    void Start()
    {
        Cursor.visible = false;
        values = GameObject.FindGameObjectWithTag("Values");
        stored = values.GetComponent<StoredValues>();
        hud = gameObject.GetComponent<HUD>();
        run = GetComponent<Run>();
        squat = GetComponent<Squat>();
        jump = GetComponent<Jump>();
        screen = GameObject.FindGameObjectWithTag("ScreenOverlay");
        overlay = screen.GetComponent<ScreenOverlay>();
        finish = GameObject.FindGameObjectWithTag("Finish");

        rightBoundry = 0.4f;
        leftBoundry = -0.4f;
        moveSideways = 7.5f;

        moveForward = 0.0f;
        moveSpeed = 0.125f;
        combinedSpeed = 0.0f;

        // vertical normal vector for hip angle
        hipUp = new Vector3(0.0f, 1.0f, 0.0f);

        keepRunning = false;
        begin = false;
    }
Пример #10
0
    // Use this for initialization
    void Start()
    {
        initText = GameObject.Find ("InitText").GetComponent<Text>();
        kneeAngles = GameObject.Find ("KneeAngles").GetComponent<Text>();
        countDown = GameObject.Find ("CountDown").GetComponent<Text>();
        values = GameObject.FindGameObjectWithTag("Values");
        stored = values.GetComponent<StoredValues>();

        noUser = "";
        straightKnees = "";
        inRange = "";
        groundedFeet = "";
        countDown.text = "";

        distanceBool = false;
        angleBool = false;
        groundedBool = false;
        coroutineStarted = false;
        delayBusy = false;

        yBottom = 0f;
    }
Пример #11
0
    // Use this for initialization
    void Start()
    {
        movement = GetComponent<Movement>();
        values = GameObject.FindGameObjectWithTag("Values");
        stored = values.GetComponent<StoredValues>();

        runSpeed = 0.0f;
        lastRunSpeed = 0.0f;
        vel = 0.1f;

        maxSteps = 30;
        leftSteps = new double[maxSteps];
        rightSteps = new double[maxSteps];

        jump = GetComponent<Jump>();
        movement = GetComponent<Movement>();
        hud = GetComponent<HUD>();

        //		yBottom = ;
    }