1234567891011121314151617181920212223242526272829303132333435 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class ZoneController : MonoBehaviour
- {
- public bool ZoneColor = true;
- public TextMesh TextMesh;
- // Start is called before the first frame update
- void Start()
- {
-
- }
- // Update is called once per frame
- void Update()
- {
-
-
- }
- void OnMouseOver()
- {
- if(ZoneColor) transform.GetComponent<Renderer>().material.color = new Color(0, 1, 0, 0.5f);
- }
- void OnMouseExit()
- {
- if (ZoneColor) transform.GetComponent<Renderer>().material.color = new Color(1, 0, 0, 0.5f);
- }
- }
|