Exemplo n.º 1
0
        public void Show(IGameObject owner)
        {
            var renderer = new Render.ShapeRenderer <Render.Shape.Circle>(new Render.Shape.Circle());

            renderer.TransformCallback = new Action <System.Drawing.Drawing2D.Matrix>((transform) =>
            {
                var position = owner.Execute <Entity.Vector>("GetCurrentPosition");
                transform.Translate(position.X, position.Y);
            });
            render = renderer;
            World.RenderManager.Regist(render);
        }
Exemplo n.º 2
0
        //protected bool CanRender { get { return mBackBuffer != IntPtr.Zero; } }
        public MainWindow()
        {
            mRender = Render.Direct3D.RenderFactory.CreateRender(Render.Direct3D.RenderType.Direct3D11);
            mRender.BackgroundColor = Colors.BlueViolet;

            mD3DImage = new D3DImage();
            mD3DImage.IsFrontBufferAvailableChanged += OnIsFrontBufferAvailableChanged;

            // Do this before initializing components to make the resouce available to XAML
            Resources["D3DImage"] = new ImageBrush(mD3DImage);

            InitializeComponent();
        }
Exemplo n.º 3
0
 public void Hide(IGameObject owner)
 {
     World.RenderManager.Unregist(render);
     render = null;
 }
Exemplo n.º 4
0
 public static void Unregist(Render.IRender renderable)
 {
     renders.Remove(renderable);
 }
Exemplo n.º 5
0
 public static void Regist(Render.IRender renderable)
 {
     // QTree로 빼야할 듯.
     renders.Add(renderable);
 }