AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
CycleClicker.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;
8 
9 namespace HoloToolkit.Examples.InteractiveElements
10 {
14  public class CycleClicker : MonoBehaviour, IInputClickHandler
15  {
16 
17  public GameObject CycleObject;
18  private ICycle mCycleComp;
19 
20  public void OnInputClicked(InputClickedEventData eventData)
21  {
22  mCycleComp = CycleObject.GetComponent<ICycle>();
23 
24  if (mCycleComp != null)
25  mCycleComp.MoveNext();
26  }
27  }
28 }
void OnInputClicked(InputClickedEventData eventData)
Definition: CycleClicker.cs:20
Interface to implement to react to simple click input.
An interface for components that cycle through an array of properties. A component can be built to cy...
Definition: ICycle.cs:13
Advances a iCycle component on click
Definition: CycleClicker.cs:14
void MoveNext()
Move to the next item in the array
Describes an input event that involves a tap.