InputController.Update C# (CSharp) 메소드

Update() 개인적인 메소드

private Update ( ) : void
리턴 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

예제 #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