//================================================================
    //計算
    public IEnumerator Calcalate(string _type)
    {
        IsCalculate = true;

        switch (_type)
        {
        case "First":
            yield return(ReadWeightAndBias());

            break;

        case "StartStage":
            yield return(FirstOutput());

            break;

        case "NextStage":
            if (parameterManager.Mode == "A")
            {
                yield return(weightAndBias.C_ReadText());

                yield return(ReadWeightAndBias());

                yield return(CalculateBPNN());

                yield return(CalculateFFNN());

                yield return(WriteOutput());

                parameterManager.NeuralNetworkID++;

                yield return(WriteWeightAndBias());
            }
            else
            {
                yield return(new WaitForSeconds(1));
            }
            break;

        case "Result":
            if (parameterManager.Mode == "A")
            {
                yield return(weightAndBias.C_ReadText());

                yield return(ReadWeightAndBias());

                yield return(CalculateBPNN());

                yield return(CalculateFFNN());

                yield return(WriteOutput());

                parameterManager.NeuralNetworkID++;

                yield return(WriteWeightAndBias());
            }
            else
            {
                yield return(new WaitForSeconds(1));
            }
            break;

        default:
            break;
        }

        parameterManager.DefeatEnemyNumInThisFloor = 0;
        playingBias = 1;
        IsCalculate = false;
        yield break;
    }