private void onHandEvent(object sender, LMWidgets.EventArg <WidgetShowcase.HandData> e)
    {
        if (WidgetShowcase.ModalityManager.Instance.HasActiveItem())
        {
            if (WidgetShowcase.ModalityManager.Instance.ActiveItemName == "ARMHUD")
            {
                Active = false;
            }
            return;
        }

        if (e.CurrentValue.HasHand && raycastEmitter != null)
        {
            if (raycastEmitter.RayCheck(e.CurrentValue.HandModel.GetPalmPosition()))
            {
                Active = true;
            }
            else
            {
                Active = false;
            }
        }
        else
        {
            Active = false;
        }
    }
Exemple #2
0
 private void onHandEvent(object sender, LMWidgets.EventArg <WidgetShowcase.HandData> e)
 {
     if (!e.CurrentValue.HasHand)
     {
         m_isAboveHorizon = false;
         return;
     }
     m_isAboveHorizon = HorizonCheck(e.CurrentValue.HandModel);
 }
 private void onStateChanged(object sender, EventArg <LeapPhysicsState> arg)
 {
     if (arg.CurrentValue == LeapPhysicsState.Interacting)
     {
         sliderPressed();
     }
     else if (arg.CurrentValue == LeapPhysicsState.Reflecting)
     {
         sliderReleased();
     }
 }
    void onJoyStickEvent(object sender, LMWidgets.EventArg <JoystickEvent> e)
    {
        switch (e.CurrentValue.Type)
        {
        case JoystickEventType.Start:
            m_isMoving = true;
            break;

        case JoystickEventType.Changed:
            m_speed = normalizeJoystickDirection(e.CurrentValue.Direction);
            m_spin  = normalizeJoystickRotation(e.CurrentValue.Rotation);
            break;

        case JoystickEventType.End:
            m_isMoving = false;
            break;

        default:
            Debug.LogError("UNKNOWN JoystickEventType " + e.CurrentValue);
            break;
        }
    }
 private void onAsterismChange(object sender, LMWidgets.EventArg <float> args)
 {
     Asterisms.AsterismDrawer.SetAsterismOpacity(args.CurrentValue);
 }
 private void onSatChange(object sender, LMWidgets.EventArg <float> args)
 {
     StarUpdater.Instance.SetStarSaturation(args.CurrentValue);
 }
 private void onDepthChange(object sender, LMWidgets.EventArg <float> args)
 {
     StarUpdater.Instance.SetZoom(args.CurrentValue);
 }
 private void onStarBrightnesChange(object sender, LMWidgets.EventArg <float> args)
 {
     StarUpdater.Instance.SetMinLuminance(args.CurrentValue);
 }
 private void onMilkyWayChange(object sender, LMWidgets.EventArg <float> args)
 {
 }
 private void onStarNameSliderChange(object sender, LMWidgets.EventArg <float> args)
 {
     StarUpdater.Instance.SetLabelOpacity(args.CurrentValue);
 }