private void _Load()
 {
     if (ScenePath != null && enabled && (loadState == LoadState.Unloaded || loadState == LoadState.Unloading))
     {
         if (loadState == LoadState.Unloaded)
         {
             loadState = LoadState.Loading;
             if (!SECTR_Modules.HasPro())
             {
                 Application.LoadLevelAdditive(ScenePath);
                 _SetupChunk();
             }
             else
             {
                 asyncLoadOp = Application.LoadLevelAdditiveAsync(ScenePath);
                 activationQueue.AddLast(this);
             }
             chunkRoot     = null;
             chunkSector   = null;
             recenterChunk = false;
         }
         else
         {
             loadState = LoadState.Loading;
         }
     }
 }
예제 #2
0
    private static Rect _ComputeBounds()
    {
        float windowWidth  = 400f;
        float windowHeight = SECTR_Modules.HasComplete() && !SECTR_Modules.DEV ? 450f : 550f;
        float centerX      = Screen.currentResolution.width * 0.5f;
        float centerY      = Screen.currentResolution.height * 0.5f;

        return(new Rect(centerX - windowWidth * 0.5f, centerY - windowHeight * 0.5f, windowWidth, windowHeight));
    }