using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameManager : MonoBehaviour
{
    [SerializeField] GameObject BallPrefab;
    [SerializeField] int BallInstanceCount;

    // Start is called before the first frame update
    void Start()
    {
        Spawns();
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void Spawns()
    {
        //コルーチンでボールを生成する
        StartCoroutine(CreateBall(BallInstanceCount));
    }
    
    public IEnumerator CreateBall(int count)
    {
        //ボールを0.04秒ごとに生成する。作成する数は引数のcount分。
        //生成する際、X軸は+0.2から-0.2の範囲、Y軸は8固定とする
        //角度の指定が出てきた場合は、Quaternion.identity(回転しない)でOK
        
        //↓これは消してください(何か戻り値を返さないとエラーになるため)
        yield return null;
    }
}
