PlayerBehaviour.Update C# (CSharp) Méthode

Update() private méthode

private Update ( ) : void
Résultat 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

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