using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Mouse : MonoBehaviour {
void Update () {
// (条件)マウスの左ボタンをクリックした時、
if (Input.GetMouseButtonDown(0))
{
this.gameObject.GetComponent<MeshRenderer>().material.color = Color.red;
}
// (条件)マウスの右ボタンを押している間、
if(Input.GetMouseButton(1))
{
transform.Rotate(new Vector3(45, 45, 45) * Time.deltaTime * 5);
}
}
}