当前位置: 首页>>代码示例>>C#>>正文


C# Scene.Initialize方法代码示例

本文整理汇总了C#中Scene.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.Initialize方法的具体用法?C# Scene.Initialize怎么用?C# Scene.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Scene的用法示例。


在下文中一共展示了Scene.Initialize方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

 public void Run(Scene scene, SceneOptions options)
 {
     var window = new GraphicsWindow(scene);
     var view = new ElementView(options);
     scene.Initialize(view);
     window.Content = view;
     window.ShowDialog();
 }
开发者ID:joewhite,项目名称:Game-graphics,代码行数:8,代码来源:ElementController.cs

示例2: SetScene

        public static void SetScene(Scene newScene)
        {
            if (currentScene != null)
                currentScene.Unload();

            currentScene = newScene;

            newScene.Initialize();
            newScene.LoadContent(StaticContent);
        }
开发者ID:cmark89,项目名称:InaneSubterra,代码行数:10,代码来源:InaneSubterra.cs

示例3: MainPage

 public MainPage()
 {
     InitializeComponent();
     var sceneOptions = new SceneOptions("/Images/800x600", 50, 42);
     _scene = new Scene(sceneOptions);
     var view = new ElementView(sceneOptions);
     _scene.Initialize(view);
     LayoutRoot.Children.Add(view);
     CompositionTarget.Rendering += new System.EventHandler(CompositionTarget_Rendering);
 }
开发者ID:joewhite,项目名称:Game-graphics,代码行数:10,代码来源:MainPage.xaml.cs

示例4: Run

 public void Run(Scene scene, SceneOptions options)
 {
     using (var form = new GraphicsForm(scene))
     {
         var view = new PictureBoxView(options);
         scene.Initialize(view);
         form.SetView(view);
         form.ShowDialog();
     }
 }
开发者ID:joewhite,项目名称:Game-graphics,代码行数:10,代码来源:PictureBoxController.cs

示例5: Form1

    public Form1()
    {
        scene = new Scene();
            scene.redraw += new EventHandler(scene_redraw);

            InitializeComponent();

            simpleOpenglControl1.InitializeContexts();
            scene.Initialize();
            Otros.LoadTexture();
            scene.element=new Lugar();//new Base111(new Point3D(0,-2.6,-20),7,new float[]{1.0f,0.4f,0.2f,1.0f});
            rc=new RC(this);
            rc.Show();
    }
开发者ID:jesantana,项目名称:ConcesionarioVirtual,代码行数:14,代码来源:Form1.cs

示例6: Opciones

 public Opciones(string quien,float[] col)
 {
     color=col;
     for(int i=0;i<4;i++)
     {
         if(color[i]<0 || color[i]>1)throw new Exception("Color Invalido");
     }
     scene = new Scene();
     scene.redraw += new EventHandler(scene_redraw);
     InitializeComponent();
     simpleOpenGlControl1.InitializeContexts();
     scene.Initialize();
     scene.Reshape(simpleOpenGlControl1.Width, simpleOpenGlControl1.Height);
     scene.element=new ColorDibujable(new Point3d(0,0,-10),color);/*new Ortoedro(new Point3D(-2,1.5,-10),4,3,2,new float[3]{0.3f,0.7f,0.9f});*/
     this.trackBar1.Value=(int)(color[0]*100);
     this.trackBar2.Value=(int)(color[1]*100);
     this.trackBar3.Value=(int)(color[2]*100);
     this.trackBar4.Value=(int)(color[3]*100);
     label5.Text="Color del Elemento "+quien;
 }
开发者ID:jesantana,项目名称:RSAGenerator,代码行数:20,代码来源:Opciones.cs

示例7: AddScene

        public void AddScene(Scene scene)
        {
            bool already_exist = false;
            foreach(Scene s in scenes)
            {
                if (s.scene_id == scene.scene_id)
                {
                    already_exist = true;
                    break;
                }
            }

            if (already_exist)
                throw new InvalidOperationException("The scene already exist in scenemanager");

            scene.scene_id = sceneid++;
            if (is_initialized)
                scene.Initialize();

            scenes.Add(scene);
        }
开发者ID:konlil,项目名称:pipe,代码行数:21,代码来源:SceneManager.cs

示例8: AddScene

 public void AddScene(Scene scene)
 {
     scene.GraphicsContext = _graphicsContext;
     scene.Initialize();
     _scenes.Add(scene);
 }
开发者ID:TiagoJSM,项目名称:Storytime,代码行数:6,代码来源:GameWorld.cs

示例9: WinForms

        public WinForms()
        {
            modified=false;
            scene = new Scene();
            scene.redraw += new EventHandler(scene_redraw);
            InitializeComponent();
            if(Screen.PrimaryScreen.Bounds.Width==800 &&Screen.PrimaryScreen.Bounds.Height==600)
            {
                this.WindowState=FormWindowState.Maximized;
            }
            this.uiStatusBar1.Panels[0].Width=this.uiTab1.Location.X+uiTab1.Width;

            simpleOpenGlControl1.InitializeContexts();
            scene.Initialize();
            scene.Reshape(simpleOpenGlControl1.Width, simpleOpenGlControl1.Height);
            config=new RSAConfiguration();
            reader=new XmlParticulaReader((string)config.Valores["particulaXml"]);
            ParametroInfo pInfo=reader.GetInfoParametros((string)config.Valores["particulaInicial"]);
            //			varPar=(object[])config.Valores["parametros"];
            //			for(int i=0;i<pInfo.Cantidad;i++)
            //			{
            //				varPar[i]=0;
            //			}
            scene.element=new RSADibujable(config, reader.GetInfoParticulas((string)config.Valores["particulaInicial"]),this);
            textBox1.Text=((RSADibujable)scene.element).AnsysObj.Ruta;
            textBox2.Text=((RSADibujable)scene.element).AnsysObj.NombreArchivo;
            Init();
            //			this.progressBar1.Location=this.uiStatusBar1.Location;
            //			this.progressBar1.Left=this.uiTab1.Location.X+uiTab1.Width;
            //			this.progressBar1.Top-=this.progressBar1.Height;
        }
开发者ID:jesantana,项目名称:RSAGenerator,代码行数:31,代码来源:WinForms.cs


注:本文中的Scene.Initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。