PlayerBehaviour.Update C# (CSharp) 메소드

Update() 개인적인 메소드

private Update ( ) : void
리턴 void
    private void Update()
    {
        // Get controller input
        Vector3 direction = new Vector3(
            Input.GetAxis("Horizontal"),
            0f,
            Input.GetAxis("Vertical"));

        // Move player
        transform.position += direction * speed;
    }
}

Usage Example

예제 #1
0
 private void Update()
 {
     if (IsPlayerBehaviourSet())
     {
         _currentBehaviour.Update();
     }
 }
All Usage Examples Of PlayerBehaviour::Update
PlayerBehaviour