public void PassingSetsDrawScene() { var World = new World(WorldTest.ServiceProvider); var ExitScene = new Scene("s1") { Enabled = true, Visible = true }; var EntranceScene = new Scene("s2") { Enabled = true, Visible = true }; var ExitEntity = new ExitEntity(); var Player = new Player(); ExitScene.Push(ExitEntity); ExitScene.Push(Player); EntranceScene.Push(new EntranceEntity()); World.Push(ExitScene); World.Push(EntranceScene); World.Initialize(false); ExitEntity.Get <Exit>().Use(Player); World.Update(); Assert.AreEqual(EntranceScene, Player.DrawScene); Assert.AreEqual(new Vector2(10, 10), Player.Get <Transform>().Position); }
//float alpha; private void SetupTitleScreen() { AddGraphic <Image>(new Image(@"..\..\Backgrounds\bg.png")); titleEntity = new TitleEntity(Game.Instance.Width / 2, Game.Instance.Height / 2); exitEntity = new ExitEntity(10, 10); if (_controller.interf.Connected) { messageEntity = new TitleMessageEntity("Press green to start!", titleEntity.X, titleEntity.Y + 150); } else { messageEntity = new TitleMessageEntity("No Launchpad detected. Please restart the game with a Launchpad plugged in.", titleEntity.X, titleEntity.Y + 150); DetectingLaunchpad = true; } Add(messageEntity); Add(titleEntity); Add(exitEntity); }
public ExitBuilder(Resources resources, Vector2 position) { exit = new ExitEntity(position); this.resources = resources; }