AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
InteractiveHoldTimer.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
UnityEngine
;
5
using
System
.Collections;
6
7
namespace
HoloToolkit
.Examples.InteractiveElements
8
{
12
public
class
InteractiveHoldTimer
: MonoBehaviour
13
{
14
public
Interactive
Button
;
15
private
Vector3 mStartScale;
16
private
void
Start()
17
{
18
mStartScale = this.gameObject.transform.localScale;
19
}
20
21
// Update is called once per frame
22
private
void
Update()
23
{
24
mStartScale.x = Button.
GetHoldPercentage
();
25
this.gameObject.transform.localScale = mStartScale;
26
}
27
}
28
}
HoloToolkit.Examples.InteractiveElements.InteractiveHoldTimer
Sample feedback for a hold timer
Definition:
InteractiveHoldTimer.cs:12
System
HoloToolkit.Examples.InteractiveElements.InteractiveHoldTimer.Button
Interactive Button
Definition:
InteractiveHoldTimer.cs:14
HoloToolkit
HoloToolkit.Examples.InteractiveElements.Interactive
Interactive exposes basic button type events to the Unity Editor and receives messages from the Gestu...
Definition:
Interactive.cs:22
UnityEngine
HoloToolkit.Examples.InteractiveElements.Interactive.GetHoldPercentage
float GetHoldPercentage()
The percentage of hold time completed
Definition:
Interactive.cs:318
Assets
HoloToolkit-Examples
UX
Scripts
Tests
InteractiveHoldTimer.cs
Generated by
1.8.12