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  {
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 }
Interactive exposes basic button type events to the Unity Editor and receives messages from the Gestu...
Definition: Interactive.cs:22
float GetHoldPercentage()
The percentage of hold time completed
Definition: Interactive.cs:318