private IEnumerator SpawnShip() { while (true) { yield return(new WaitForSeconds(BOSS_JET_SPAWN_TIME)); PoolObject shipObject = PoolManager.Get(POOL_BOSS_SHIP_ID); shipObject.transform.position = transform.position; BaseShip ship = shipObject.GetComponent <BaseShip>(); ship.Activate(); ship.target = WaypointController.instance.attakPoint; ship.attackState = true; } }