、
using UnityEngine;
using System.Collections;
/**
* <summary>
* <para>作者:巨星电艺</para>
* <para>编写日期:巨星电艺</para>
**/
public class ouyChangeColor : MonoBehaviour
{
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
if(Input.GetKeyDown(KeyCode.R))
{
GetComponent<Renderer>().material.color = Color.red;
}
if(Input.GetKeyDown(KeyCode.B))
{
GetComponent<Renderer>().material.color = Color.blue;
}
if (Input.GetKeyDown (KeyCode.G))
{
GetComponent<Renderer>().material.color = Color.green;
}
}
}