Пример #1
0
        protected override void OnCreate()
        {
            base.OnCreate();

            if (Character != null && Character.ParentScene == null)             //show only when not in a scene
            {
                var scene = CreateScene(false);
                CreateObject();
                scene.Enabled = true;

                SetCameraByBounds(scene.CalculateTotalBoundsOfObjectsInSpace(), mode2D: true);
            }
            else
            {
                ViewportControl.AllowCreateRenderWindow = false;
                ObjectEx.PropertySet(ViewportControl, "Visible", false);
                //ViewportControl.Visible = false;
            }
        }