InputController.Update C# (CSharp) Méthode

Update() private méthode

private Update ( ) : void
Résultat void
    void Update()
    {
        var moveVector = GetInput();
        int horizontal = Mathf.RoundToInt(moveVector.x);
        int vertical = Mathf.RoundToInt(moveVector.y);

        if (horizontal != 0 || vertical != 0)
        {
            var movement = ToMovement(horizontal, vertical);
            Pools.pool.ReplaceMoveInput(movement).IsDeleteOnExit(true);
        }
    }

Usage Example

Exemple #1
0
 // Update is called once per frame
 public static void Update()
 {
     UIController.Update();
     InputController.Update();
     World.Update();
     Lifeforms.Update();
 }
All Usage Examples Of InputController::Update