示例#1
0
        // Use this for initialization
        void Start ()
        {
            Scene = new RSScene(Host, Port, Timeout);
            Scene.Filename = SceneFilename;
            Scene.OnAppIniting += new ApplicationInitialisingCallback(OnAppInitingCallback);
            
            Viewport = new RSViewport(Scene);	
            Viewport.UseRenderLoop = UseRenderLoop;
            Viewport.RenderLoopHandler = RenderLoopHandler;
            Viewport.Renderer = Renderer;
            Viewport.RenderTarget = RenderTarget;
            Viewport.RenderLoopInterval = RenderLoopInterval;
            Viewport.OnRestartRender += new RSViewport.RestartRenderCallback(OnRestartRender);
            Viewport.OnRender += new ResponseHandler(OnRender);

            migenius.rs4.core.Logger.OnLog += new migenius.rs4.core.Logger.LogHandler(onLog);
        }
示例#2
0
        // Use this for initialization
        void Start ()
        {
            Scene = new RSScene(Host, Port, Timeout);
            Scene.Filename = SceneFilename;
            Scene.OnAppIniting += new ApplicationInitialisingCallback(OnAppInitingCallback);
            
            Viewport = new RSViewport(Scene);	
            Viewport.UseRenderLoop = UseRenderLoop;
            Viewport.RenderLoopHandler = RenderLoopHandler;
            Viewport.Renderer = Renderer;
            Viewport.RenderTarget = RenderTarget;
            Viewport.RenderLoopInterval = RenderLoopInterval;
            Viewport.OnRestartRender += new RSViewport.RestartRenderCallback(OnRestartRender);
            Viewport.OnRender += new ResponseHandler(OnRender);

            Logger.OnLog += new Logger.LogHandler(onLog);

            //Cache gui texture
            if(RenderTarget !=null)
            m_RenderTexture = RenderTarget.GetComponent<GUITexture>();
        }