Mercurial > hg > Members > kazuma > JungleforUnity
view Assets/Application/Scripts/Eye.cs @ 5:12f4f937da7f
Add BenchMark
author | Kazuma |
---|---|
date | Thu, 10 Nov 2016 04:21:19 +0900 |
parents | 2dd40b4412e4 |
children |
line wrap: on
line source
using UnityEngine; using System.Collections; public class Eye : MonoBehaviour { // Update is called once per frame void Update () { RaycastHit hit; if (Physics.Raycast (transform.position, transform.forward * 10, out hit)) { // Select picture. Player.Instance.SetLookedObject (hit.collider.gameObject); } else { Player.Instance.SetLookedObject (null); } } }