/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); Window.AllowUserResizing = true; //var myScene = Scene.createWithDefaultRenderer(Color.CornflowerBlue); //var texture = myScene.content.Load<Texture2D>("Graphics/player"); // setup our Scene by adding some Entities // var entityOne = myScene.createEntity("entity-one"); // entityOne.addComponent(new Sprite(texture)); // var entityTwo = myScene.createEntity("entity-two"); // entityTwo.addComponent(new Sprite(texture)); // move entityTwo to a new location so it isn't overlapping entityOne // entityTwo.transform.position = new Vector2(200, 200); //scene = myScene; //do butterscene var butterScene = new ButterScene(); butterScene.clearColor = Color.DarkGreen; butterScene.addRenderer(new DefaultRenderer(0, null)); scene = butterScene; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); Window.AllowUserResizing = true; //do butterscene var butterScene = new ButterScene(); butterScene.clearColor = Color.DarkGreen; butterScene.addRenderer(new DefaultRenderer(0, null)); scene = butterScene; //var myScene = Scene.createWithDefaultRenderer(Color.Black); //var butterfly1Texture = myScene.contentManager.Load<Texture2D>("Textures/butterfly1"); //var entityOne = myScene.createEntity("butterfly1"); //entityOne.addComponent(new Sprite(butterfly1Texture)); //add movement simple mover //entityOne.addComponent(new SimpleMover()); //entityOne.transform.position = new Vector2(200, 200); //scene = myScene; //var myScene = ButterScene.createWithDefaultRenderer(Color.Orange); //var myScene = scene.createWithDefaultRenderer<ButterScene>(Color.Orange); //scene = myScene; }