PlayerBehaviour.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return 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
ファイル: Player.cs プロジェクト: AlexandrShunyaev/GameX
 private void Update()
 {
     if (IsPlayerBehaviourSet())
     {
         _currentBehaviour.Update();
     }
 }
All Usage Examples Of PlayerBehaviour::Update
PlayerBehaviour