Пример #1
0
        public Scene(SceneLayers sceneLayers, IFrameStep frameStep = null)
        {
            if (sceneLayers != null)
            {
                this.camera = new Camera(sceneLayers.gameCanvas);
            }

            this.sceneLayers = sceneLayers;
            this.frameStep   = frameStep != null ? frameStep : new EmptyFrameStep();
        }
Пример #2
0
 protected void BuildSceneLayers(MachinaRuntime runtime)
 {
     if (SceneLayers == null)
     {
         // this is lazy initialized for the dumbest reason: to be debuggable it needs to have a font, the font doesn't come in until after loading is complete
         SceneLayers = new SceneLayers(new GameViewport(renderResolution, resizeBehavior), runtime);
         if (!this.skipDebug)
         {
             SceneLayers.BuildDebugScene(this);
         }
     }
 }