public override void Initialize() { //throw new NotImplementedException(); entityManager.Initialize(); line2DSystem.Initialize(); textInfoEntity = new DummyEntity("text info entity"); textInfoEntity.GetComponent <PositionComponent>().Position = new Vector3(-650, 300, 0); textInfoEntity.AddComponent(new Text2DComponent("Fonts/Terminus", "You can move the camera around by pressing the Arrow keys.\nYou can move some objects on screen around by pressing W, A, S, or D." + "\n\nYou can press U to spawn 50 more entities that has text, sprite image, and line components.\n You can press P to remove entities at random.\n\nYou can press Q to go to load another state/screen to see the Button System", Color.White, Text2DAlignment.Left, false)); squareSprite = new SquareSprite("SquareSprite"); squareSprite2 = new SquareSprite("SquareSprite2"); squareSprite2.GetComponent <PositionComponent>().Position = new Vector3(100, 100, 0); squareSprite2.AddComponent(new Text2DComponent("Fonts/Terminus", "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.\nThe quick brown fox jumps over the lazy dog.\n1234567890", Color.White, Text2DAlignment.Left, false)); }
public override void Initialize() { entityManager.Initialize(); textInfoEntity = new DummyEntity("text info entity"); textInfoEntity.GetComponent <PositionComponent>().Position = new Vector3(-650, 300, 0); textInfoEntity.AddComponent(new Text2DComponent("Fonts/Terminus", "Buttons are clickable, and change colour upon hovering. Look at the console output to see a response from clicking.\n\nYou can press Q to go back to previous state/screen.", Color.White, Text2DAlignment.Left, false)); buttonEntity = new Button("ButtonEntity"); buttonEntity2 = new Button("ButtonEntity2"); buttonEntity2.GetComponent <PositionComponent>().Position = new Vector3(0, 50, 0); buttonEntity2.GetComponent <ButtonComponent>().cameraSpace = false; buttonEntity2.GetComponent <ButtonComponent>().Click += ButtonTestPrint; buttonEntity.GetComponent <ButtonComponent>().Click += delegate(object s, EventArgs e) { ButtonTestPrintNum(s, e, new Random().Next(0, 1000)); }; }