Exemplo n.º 1
0
        private void LookHandle(LookEvent e)
        {
            if (e.Session != Session)
            {
                return;
            }

            if (e.Direction == LookDirection.Left)
            {
                bodyTransform.SetFlipY(true);
            }

            if (e.Direction == LookDirection.Right)
            {
                bodyTransform.SetFlipY(false);
            }
        }
Exemplo n.º 2
0
        private void LookHandle(LookEvent e)
        {
            if (e.Session != Session)
            {
                return;
            }

            if (e.Direction == LookDirection.Left)
            {
                flip.ToLeft();
            }

            if (e.Direction == LookDirection.Right)
            {
                flip.ToRight();
            }
        }
Exemplo n.º 3
0
        private void LookHandle(LookEvent e)
        {
            if (e.Session != Session)
            {
                return;
            }

            rotation.LookAt = e.Position;

            if (e.Direction == LookDirection.Left)
            {
                flip.SetLookAtLeft();
            }

            if (e.Direction == LookDirection.Right)
            {
                flip.SetLookAtRight();
            }
        }
Exemplo n.º 4
0
 public void OnLook(InputAction.CallbackContext context)
 {
     LookEvent.Invoke(context.ReadValue <Vector2>());
 }