Update() публичный Метод

Logic that runs every frame.
public Update ( ) : void
Результат void
Пример #1
0
    void FixedUpdate()
    {
        ball.state.inputDirection.Value = ball.playerInfo.inputScheme.Value.GetInputDirection();
        if (ball.state.inputDirection.Value == Vector2.zero)
        {
            ball.state.freshInput.Value = true;
        }
        bool checkForTransition = true;

        while (checkForTransition)
        {
            checkForTransition = CheckForNewState();
        }
        controller.Update(ball.state, rb2d);
        if (ball.state.grounded.Value)
        {
            ball.state.timeGrounded.Value += Time.fixedDeltaTime;
        }
        else
        {
            ball.state.timeAirborn.Value += Time.fixedDeltaTime;
        }
        ball.state.timeInState.Value += Time.fixedDeltaTime;
    }
Пример #2
0
 public void Update(float deltaTime)
 {
     _ballController.Update(deltaTime);
     _tileController.Update(deltaTime);
     _gameplayController.Update();
 }