DungeonMasterEngine.Player.FreeLookCamera.GetTranslation C# (CSharp) Method

GetTranslation() protected method

protected GetTranslation ( GameTime time ) : Microsoft.Xna.Framework.Vector3
time Microsoft.Xna.Framework.GameTime
return Microsoft.Xna.Framework.Vector3
        protected virtual Vector3 GetTranslation(GameTime time)
        {
            var move = Vector3.Zero;

            var keyboardState = Keyboard.GetState();
            if (keyboardState.IsKeyDown(Keys.A))
                move += LeftDirection;

            if (keyboardState.IsKeyDown(Keys.D))
                move += RighDirection;

            if (keyboardState.IsKeyDown(Keys.S))
                move += BackwardDirection;

            if (keyboardState.IsKeyDown(Keys.W))
                move += ForwardDirection;

            return move;
        }