NRPhoneControllerVisual.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /****************************************************************************
  2. * Copyright 2019 Nreal Techonology Limited. All rights reserved.
  3. *
  4. * This file is part of NRSDK.
  5. *
  6. * https://www.nreal.ai/
  7. *
  8. *****************************************************************************/
  9. namespace NRKernal
  10. {
  11. using System.Collections;
  12. using System.Collections.Generic;
  13. using UnityEngine;
  14. /// <summary> A nr phone controller visual. </summary>
  15. public class NRPhoneControllerVisual : MonoBehaviour, IControllerVisual
  16. {
  17. /// <summary> Destroys the self. </summary>
  18. public void DestroySelf()
  19. {
  20. if (gameObject)
  21. Destroy(gameObject);
  22. }
  23. /// <summary> Sets an active. </summary>
  24. /// <param name="isActive"> True if is active, false if not.</param>
  25. public void SetActive(bool isActive)
  26. {
  27. if (!gameObject)
  28. return;
  29. gameObject.SetActive(isActive);
  30. }
  31. /// <summary> Updates the visual described by state. </summary>
  32. /// <param name="state"> The state.</param>
  33. public void UpdateVisual(ControllerState state)
  34. {
  35. if (!gameObject || !gameObject.activeSelf)
  36. return;
  37. }
  38. }
  39. }