// 移動スピード
public float speed;
// 弾を撃つ間隔 public float shotDelay; // 弾のPrefab public GameObject bullet; // 弾の作成 public void Shot (Transform origin) { Instantiate (bullet, origin.position, origin.rotation); } // 機体の移動 public void Move (Vector2 direction) { GetComponent<Rigidbody2D>().velocity = direction * speed; }
今現在でここまで進んでいて自機は自動で弾を撃つのですが
自分で撃つようにするにはどうしたらいいですか?
Input.GetKeyをplayerという別のスクリプトから宣言したいです
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。