public void Sin(int _appearNum, PlayersEnemyData _enemyData, Vector2 _appearPos,
                        Vector2 _posInterval)
        {
            int   appearCount = 0;
            float appearSpace = -20;
            float appearPosX  = -90;
            float appearPosY  = 40;

            if (_enemyData.PlayerType.Equals("Enemy2"))
            {
                appearPosX = -2.0f;
            }

            for (int i = 0; i < _enemyData.SinEnemys.Length; i++)
            {
                if (appearCount >= _appearNum)
                {
                    break;
                }

                if (!_enemyData.SinEnemys[i].activeSelf)
                {
                    // 起点に設置
                    _enemyData.SinEnemys[i].transform.position =
                        new Vector3(appearPosX + appearCount * appearSpace, appearPosY, AppearZPos);
                    _enemyData.SinEnemys[i].SetActive(true);
                    appearCount++;

                    // 次の起点の間隔をあける
                    _appearPos += _posInterval;
                }
            }
        }
        public void Stay(int _appearNum, PlayersEnemyData _enemyData, Vector2 _appearPos,
                         Vector2 _posInterval)
        {
            int   appearCount = 0;
            float appearSpace = System.Math.Abs(_enemyData.LeftPosX - _enemyData.RightPosX) / (_appearNum + 1);
            //float appearRightPosX = _enemyData.RightPosX - appearSpace;
            float appearLeftPosX = _enemyData.LeftPosX + appearSpace;

            for (int i = 0; i < _enemyData.StayEnemys.Length; i++)
            {
                if (appearCount >= _appearNum)
                {
                    break;
                }

                if (!_enemyData.StayEnemys[i].activeSelf)
                {
                    // 起点に設置
                    _enemyData.StayEnemys[i].transform.position =
                        new Vector3(appearLeftPosX + appearCount * appearSpace, _enemyData.EnemyStartPos.y,
                                    _enemyData.EnemyStartPos.z);
                    _enemyData.StayEnemys[i].SetActive(true);
                    appearCount++;

                    // 次の起点の間隔をあける
                    _appearPos += _posInterval;
                }
            }
        }
        // private static EnemyManager instance = null;

        // ↓スーパークラスで定義済み
        // private float elapsedTime;

        protected override void OnAwake()
        {
            this.Enemy1Data = new PlayersEnemyData("Enemy1", Enemy1Patterns, this.poolEnemy);
            this.Enemy2Data = new PlayersEnemyData("Enemy2", Enemy2Patterns, this.poolEnemy);
            this.SetEnemy(this.Enemy1Data);
            this.SetEnemy(this.Enemy2Data);
            this.Enemy1Data.EnemyAppearPass = this.interval;
            this.Enemy2Data.EnemyAppearPass = this.interval;
        }
        private void SetEnemy(PlayersEnemyData _enemyData)
        {
            for (int i = 0; i < _enemyData.PoolEnemy; i++)
            {
                _enemyData.StraightEnemys[i]      = CreateEnemy(this.straightEnemy);
                _enemyData.CircleEnemys[i]        = CreateEnemy(this.circleEnemy);
                _enemyData.QuadraticEnemys[i]     = CreateEnemy(this.quadraticEnemy);
                _enemyData.StraightEnemys[i].tag  = _enemyData.PlayerType;
                _enemyData.CircleEnemys[i].tag    = _enemyData.PlayerType;
                _enemyData.QuadraticEnemys[i].tag = _enemyData.PlayerType;
                _enemyData.StayEnemys[i]          = CreateEnemy(this.stayEnemy);
                _enemyData.StayEnemys[i].tag      = _enemyData.PlayerType;
                _enemyData.SinEnemys[i]           = CreateEnemy(this.sinEnemy);
                _enemyData.SinEnemys[i].tag       = _enemyData.PlayerType;
            }

            _enemyData.BeeEnemy     = CreateEnemy(this.beeEnemy);
            _enemyData.BeeEnemy.tag = _enemyData.PlayerType;
        }
        /*
         * public void Appear(int _appearNum, GameObject[] _enemyPool, Vector2 _appearPos, Vector2 _posInterval)
         * {
         *  int appearCount = 0;
         *
         *  for (int i = 0; i < _enemyPool.Length; i ++)
         *  {
         *      if (appearCount >= _appearNum) { break; }
         *
         *      if (_enemyPool[i].activeSelf)
         *      {
         *          // 起点に設置
         *          _enemyPool[i].transform.position = new Vector3 (_appearPos.x, _appearPos.y, AppearZPos);
         *          _enemyPool[i].SetActive (true);
         *          appearCount++;
         *
         *          // 次の起点の間隔をあける
         *          _appearPos += _posInterval;
         *      }
         *  }
         * }
         */
        /// <summary>
        ///
        /// </summary>
        /// <param name="_appearNum">敵機の登場数</param>
        /// <param name="_appearPos">登場する座標</param>
        /// <param name="_posInterval">登場する座標の間隔</param>
        public void Circle(int _appearNum, PlayersEnemyData _enemyData, Vector2 _appearPos, Vector2 _posInterval)
        {
            int appearCount = 0;

            for (int i = 0; i < _enemyData.CircleEnemys.Length; i++)
            {
                if (appearCount >= _appearNum)
                {
                    break;
                }

                if (!_enemyData.CircleEnemys[i].activeSelf)
                {
                    // 起点に設置
                    _enemyData.CircleEnemys[i].transform.position = new Vector3(_appearPos.x, _appearPos.y, AppearZPos);
                    _enemyData.CircleEnemys[i].GetComponent <CircleEnemy>().CenterPos = this.transform.position;
                    _enemyData.CircleEnemys[i].SetActive(true);
                    appearCount++;

                    // 次の起点の間隔をあける
                    _appearPos += _posInterval;
                }
            }
        }
 public void Bee(PlayersEnemyData _enemyData)
 {
     _enemyData.BeeEnemy.transform.position = _enemyData.EnemyStartPos;
     _enemyData.BeeEnemy.SetActive(true);
 }
        public void EnemyAppear(float _nowPass, PlayersEnemyData _enemyData)
        {
            if (_nowPass >= _enemyData.EnemyAppearPass)
            {
                if (_enemyData.EnemyCount < _enemyData.EnemyPatterns.Length)
                {
                    switch (_enemyData.EnemyPatterns[_enemyData.EnemyCount].ToString())
                    {
                    case "StraightHorizontal":
                        StraightHorizontal(
                            5,
                            _enemyData,
                            this.enemyManagerDebug.StraightHorizontalPos,
                            this.enemyManagerDebug.StraightHorizontalPosInterval);
                        break;

                    case "StraightVertical":
                        StraightVertical();
                        break;

                    case "Quadratic":
                        Quadratic(
                            3,
                            _enemyData,
                            this.enemyManagerDebug.QuadraticPos,
                            this.enemyManagerDebug.QuadraticPosInterval);
                        break;

                    case "Circle":
                        Circle(
                            1,
                            _enemyData,
                            this.enemyManagerDebug.CirclePos,
                            this.enemyManagerDebug.CirclePosInterval);
                        break;

                    case "Stay":
                        Stay(
                            5,
                            _enemyData,
                            this.enemyManagerDebug.StraightHorizontalPos,
                            this.enemyManagerDebug.StraightHorizontalPosInterval);
                        break;

                    case "Sin":
                        Sin(
                            3,
                            _enemyData,
                            this.enemyManagerDebug.StraightHorizontalPos,
                            this.enemyManagerDebug.StraightHorizontalPosInterval);
                        break;

                    case "Bee":
                        Bee(
                            _enemyData);
                        break;
                    }

                    _enemyData.EnemyCount++;
                    _enemyData.EnemyAppearPass += this.interval;
                }
            }
        }