Skip to content

Commit 44a01ee

Browse files
Stephen Hodgsonkeveleigh
authored andcommitted
DehydrationDeactivation.cs tweak (#401)
* minor formatting changes to HandDraggable.cs * more responsive cursor from dot to circle, allows for interruption of animation state. * reverted HandDraggable (changes addressed in separate PR) * DehydrationDeactivation.cs moved gameobject.SetActive(false) into OnStateExit to ensure we finish our animation before turning the game object off. * Reverted Cursor Changes Addressed in separate PR * Updated Comments in DehydrationDeactivation for OnStateExit
1 parent 0397cfa commit 44a01ee

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Assets/HoloToolkit/Input/Scripts/Interactions/HandDraggable.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ namespace HoloToolkit.Unity.InputModule
1111
/// Dragging is done by calculating the angular delta and z-delta between the current and previous hand positions,
1212
/// and then repositioning the object based on that.
1313
/// </summary>
14-
public class HandDraggable : MonoBehaviour, IFocusable, IInputHandler, ISourceStateHandler
14+
public class HandDraggable : MonoBehaviour,
15+
IFocusable,
16+
IInputHandler,
17+
ISourceStateHandler
1518
{
1619
/// <summary>
1720
/// Event triggered when dragging starts.

Assets/HoloToolkit/Input/Tests/Scripts/DehydrationDeactivation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ namespace HoloToolkit.Unity.InputModule.Tests
88
public class DehydrationDeactivation : StateMachineBehaviour
99
{
1010
/// <summary>
11-
/// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
11+
/// OnStateExit is called when a transition ends and the state machine finishes evaluating this state
1212
/// </summary>
1313
/// <param name="animator">Animator that triggered OnStateEnter.</param>
1414
/// <param name="stateInfo">Animator state info.</param>
1515
/// <param name="layerIndex">Layer index.</param>
16-
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
16+
public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
1717
{
1818
animator.transform.gameObject.SetActive(false);
1919
}
2020
}
21-
}
21+
}

0 commit comments

Comments
 (0)