如果需要处理鼠标点击物体的情况,
可以当数据接触物体时,鼠标手势改变,然后点击后和NPC产生对话等:
using UnityEngine; using System.Collections; public class example : MonoBehaviour { void OnMouseOver() { renderer.material.color -= new Color(0.1F, 0, 0) * Time.deltaTime; } }
如果需要处理鼠标点击物体的情况,
可以当数据接触物体时,鼠标手势改变,然后点击后和NPC产生对话等:
using UnityEngine; using System.Collections; public class example : MonoBehaviour { void OnMouseOver() { renderer.material.color -= new Color(0.1F, 0, 0) * Time.deltaTime; } }
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。