Пример #1
0
    IEnumerator SpawnStreamingCube()
    {
        ClipPlanePoints clipPoints = ClipPlanePoints.Instance;
        Camera          camera     = clipPoints.Camera;
        Vector3         cubeVel    = camera.transform.up * m_streamCubeSpeed;

        do
        {
            for (int i = 0, count = m_spawnIndices.Length; i < count; ++i)
            {
                if (m_spawnIndices[i])
                {
                    SpawnStreamingCube(i, cubeVel);
                }
                else if (m_lastSpawnIndices[i])
                {
                    StreamingCube.CleanupAll(i);
                }

                m_lastSpawnIndices[i] = m_spawnIndices[i];
            }

            yield return(new WaitForSeconds(m_streamCubeSpawnTime));
        } while (AppManager.IsInAmbientMode);

        CLeanupAllStreamingCubes();
        ResetAllIndices();
        m_streamCubes = null;
    }
Пример #2
0
 //Cubes that have already been streamed in...
 public void CLeanupAllStreamingCubes()
 {
     for (int i = 0, count = m_spawnIndices.Length; i < count; ++i)
     {
         StreamingCube.CleanupAll(i);
     }
 }