V_Text.cs 464 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace Visyde{
  6. public class V_Text : MonoBehaviour {
  7. public Text crosshairNameText;
  8. V_SMC_Handler handler;
  9. // Use this for initialization
  10. void Start () {
  11. handler = GetComponent<V_SMC_Handler> ();
  12. }
  13. // Update is called once per frame
  14. void Update () {
  15. crosshairNameText.text = handler.crossHairs [handler.curCrossHair].name;
  16. }
  17. }
  18. }