Inheritance: MonoBehaviour
Ejemplo n.º 1
0
        public void LoadExample(DemoBase demoBase)
        {
            _gfxViewRoot.MakeCurrent();


            GLPainterCore pcx       = _gfxViewRoot.GLPainterCore();
            GLPainter     glPainter = _gfxViewRoot.GetGLPainter();

            pcx.SmoothMode = SmoothMode.Smooth;//set anti-alias

            //create text printer for opengl
            demoBase.Init();
            _demoBase = demoBase;

            _demoUI = new DemoUI(demoBase, _myWidth, _myHeight);
            _demoUI.SetCanvasPainter(pcx, glPainter);
            //-----------------------------------------------
            //demoBase.SetEssentialGLHandlers(
            //    () => _glControl.SwapBuffers(),
            //    () => _glControl.GetEglDisplay(),
            //    () => _glControl.GetEglSurface()
            //);
            //-----------------------------------------------

            DemoBase.InvokeGLPainterReady(demoBase, pcx, glPainter);
            //Add to RenderTree
            _rootGfx.AddChild(_demoUI.GetPrimaryRenderElement());
        }
Ejemplo n.º 2
0
        protected override void _Init()
        {
            _ui = GetComponent<DemoUI>();
            Pool.GetComponent<UIEventListener>(_ui.btnButton).onClick += _OnClickBtn;

            base._Init();
        }
Ejemplo n.º 3
0
 public void LoadExample(DemoBase exBase)
 {
     _demoUI = new DemoUI(exBase, _myWidth, _myHeight);
     _rootGfx.AddChild(_demoUI.GetPrimaryRenderElement(_surfaceViewport.RootGfx));
 }
Ejemplo n.º 4
0
 void Awake()
 {
     AddListener();
     singleton = this;
 }
Ejemplo n.º 5
0
	// Use this for initialization
	void Awake ()
	{
		instance = this;
	}