摘要: 创建一个cube的go 绑定一个脚本代码:using UnityEngine;using System.Collections;public class Mouse : MonoBehaviour{ Ray ray; RaycastHit hit; void Update() { if (Input.GetMouseButton(0)) { ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ra... 阅读全文
posted @ 2012-08-02 11:52 Marble 阅读(2631) 评论(1) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;public class ShowHide : MonoBehaviour { public Texture2D img; void Update () { if (Time.time % 2 < 1) { guiTexture.texture = img; } else guiTexture.texture = null; }} 阅读全文
posted @ 2012-08-02 10:55 Marble 阅读(1981) 评论(0) 推荐(0) 编辑