Mercurial > hg > Members > kazuma > JungleforUnity
view Assets/Application/Scripts/Eye.cs @ 10:3fefb9f9025d
put Attribute class.
author | Kazuma Takeda |
---|---|
date | Fri, 20 Jan 2017 07:30:26 +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); } } }