Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
771 B

  1. namespace VRTK.Examples
  2. {
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public abstract class VRTKExample_OptionTile : MonoBehaviour
  6. {
  7. public Image backgroundImage;
  8. public Color highlightColor = Color.yellow;
  9. public abstract void Activate();
  10. protected Color originalColor = Color.clear;
  11. public virtual void Highlight()
  12. {
  13. if (backgroundImage != null)
  14. {
  15. originalColor = backgroundImage.color;
  16. backgroundImage.color = highlightColor;
  17. }
  18. }
  19. public virtual void Unhighlight()
  20. {
  21. if (backgroundImage != null)
  22. {
  23. backgroundImage.color = originalColor;
  24. }
  25. }
  26. }
  27. }