private bool findRandomTargetEverywhere(out Vector3 target, out float angle)
        {
            GameAreaManager   gam = Singleton <GameAreaManager> .instance;
            SimulationManager sm  = Singleton <SimulationManager> .instance;
            int   i = sm.m_randomizer.Int32(0, 4);
            int   j = sm.m_randomizer.Int32(0, 4);
            float minX;
            float minZ;
            float maxX;
            float maxZ;

            gam.GetAreaBounds(i, j, out minX, out minZ, out maxX, out maxZ);

            float randX = (float)sm.m_randomizer.Int32(0, 10000) * 0.0001f;
            float randZ = (float)sm.m_randomizer.Int32(0, 10000) * 0.0001f;

            target.x = minX + (maxX - minX) * randX;
            target.y = 0f;
            target.z = minZ + (maxZ - minZ) * randZ;
            target.y = Singleton <TerrainManager> .instance.SampleRawHeightSmoothWithWater(target, false, 0f);

            angle = (float)sm.m_randomizer.Int32(0, 10000) * 0.0006283185f;
            return(true);
        }
        private bool findRandomTargetInLockedAreas(out Vector3 target, out float angle)
        {
            GameAreaManager   gam = Singleton <GameAreaManager> .instance;
            SimulationManager sm  = Singleton <SimulationManager> .instance;

            // No locked areas
            if (gam.m_areaCount >= 25)
            {
                target = Vector3.zero;
                angle  = 0f;
                return(false);
            }

            int lockedAreaCounter = sm.m_randomizer.Int32(1, 25 - gam.m_areaCount);

            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 5; j++)
                {
                    if (isUnlocked(i, j))
                    {
                        continue;
                    }

                    if (--lockedAreaCounter == 0)
                    {
                        float minX;
                        float minZ;
                        float maxX;
                        float maxZ;
                        gam.GetAreaBounds(j, i, out minX, out minZ, out maxX, out maxZ);
                        float minimumEdgeDistance = 100f;
                        if (isUnlocked(j - 1, i))
                        {
                            minX += minimumEdgeDistance;
                        }
                        if (isUnlocked(j, i - 1))
                        {
                            minZ += minimumEdgeDistance;
                        }
                        if (isUnlocked(j + 1, i))
                        {
                            maxX -= minimumEdgeDistance;
                        }
                        if (isUnlocked(j, i + 1))
                        {
                            maxZ -= minimumEdgeDistance;
                        }

                        float randX = (float)sm.m_randomizer.Int32(0, 10000) * 0.0001f;
                        float randZ = (float)sm.m_randomizer.Int32(0, 10000) * 0.0001f;
                        target.x = minX + (maxX - minX) * randX;
                        target.y = 0f;
                        target.z = minZ + (maxZ - minZ) * randZ;
                        target.y = Singleton <TerrainManager> .instance.SampleRawHeightSmoothWithWater(target, false, 0f);

                        angle = (float)sm.m_randomizer.Int32(0, 10000) * 0.0006283185f;
                        DebugLogger.Log(string.Format("findRandomTargetInLockedAreas, j = {0}, i = {1}, areaCount = {2}", j, i, gam.m_areaCount));
                        return(true);
                    }
                }
            }

            target = Vector3.zero;
            angle  = 0f;
            return(false);
        }