12345678910111213141516171819202122232425262728293031323334 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- namespace Visyde{
- public class V_SMC_Handler : MonoBehaviour {
- public Sprite[] crossHairs;
- [HideInInspector]
- public int curCrossHair = 0;
-
- void Update () {
-
- if (Input.GetKeyDown (KeyCode.Mouse1)) {
- if (curCrossHair < crossHairs.Length - 1) {
- curCrossHair += 1;
- } else {
- curCrossHair = 0;
- }
- }
-
- GetComponent<Image> ().sprite = crossHairs [curCrossHair];
- }
- public void ChangeColor (Color color){
- this.GetComponent<Image> ().color = color;
- }
- }
- }
|