Input.GetButton
でキー操作に対応。
if (Input.GetButton ("Fire1") && Time.time > nextFire) {
nextFire = Time.time + fireRate;
clone = Instantiate (projectile, transform.position, transform.rotation);
}
clone = Instantiate (projectile, transform.position, transform.rotation);
}
0 件のコメント:
コメントを投稿