标签:tor color div system 设置 art 调用 vector ext
using UnityEngine; using System.Collections; public class mouseCursor : MonoBehaviour { /// <summary> /// 变换样式 /// </summary> public Texture2D cursorTexture; /// <summary> /// 默认鼠标样式 /// </summary> public Texture2D fTexture; /// <summary> /// 设置鼠标默认方式 /// </summary> public CursorMode cursorMode = CursorMode.Auto; /// <summary> /// 在第一次调用update之前调用 /// </summary> public void Start() { ///设置鼠标样式 Cursor.SetCursor(fTexture, Vector2.zero, cursorMode); } /// <summary> /// 鼠标退出时调用 /// </summary> public void OnMouseExit() { ///设置鼠标样式 Cursor.SetCursor(fTexture, Vector2.zero, cursorMode); } /// <summary> /// 鼠标进入时调用 /// </summary> public void OnMouseEnter() { Cursor.SetCursor(cursorTexture, Vector2.zero, cursorMode); } }
标签:tor color div system 设置 art 调用 vector ext
原文地址:http://www.cnblogs.com/fxy-588/p/7058141.html