AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
TapResponder.cs
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License. See LICENSE in the project root for license information.
3
4
using
System
;
5
using
UnityEngine
;
6
7
namespace
HoloToolkit
.Unity.InputModule.Tests
8
{
13
public
class
TapResponder
: MonoBehaviour,
IInputClickHandler
14
{
15
public
void
OnInputClicked
(
InputClickedEventData
eventData)
16
{
17
// Increase the scale of the object just as a response.
18
gameObject.transform.localScale += 0.05f * gameObject.transform.localScale;
19
20
eventData.Use();
// Mark the event as used, so it doesn't fall through to other handlers.
21
}
22
}
23
}
HoloToolkit.Unity.InputModule.Tests.TapResponder
This class implements IInputClickHandler to handle the tap gesture. It increases the scale of the obj...
Definition:
TapResponder.cs:13
System
HoloToolkit.Unity.InputModule.Tests.TapResponder.OnInputClicked
void OnInputClicked(InputClickedEventData eventData)
Definition:
TapResponder.cs:15
HoloToolkit.Unity.InputModule.IInputClickHandler
Interface to implement to react to simple click input.
Definition:
IInputClickHandler.cs:11
HoloToolkit.Unity.InputModule.InputClickedEventData
Describes an input event that involves a tap.
Definition:
InputClickedEventData.cs:11
HoloToolkit
UnityEngine
Assets
HoloToolkit-Examples
Input
Scripts
TapResponder.cs
Generated by
1.8.12