22. とりあえず書いてみる
using UnityEngine;
using System.Collections;
public class Hoge : MonoBehaviour {
// Use this for initialization
void Start() {
}
// Update is called once per frame
void Update() {
if( Input.GetMouseButtonDown( 0 ) ) {
transform.Translate( Vector3.left );
} else if( Input.GetMouseButtonDown( 1 ) ) {
transform.Translate( Vector3.right );
}
}
}