// CONSTRUCTORS -------------------------------------------------------------------------------------------------------------------- public CreditsScreen(MenuSystemScene pMenuSystem) { MenuSystem = pMenuSystem; Panels = new List<Node> { new CreditsPanel(), new ThanksPanel() }; SwipePanels = new SwipePanels(Panels) { Position = new Vector2(44.0f, 88.0f) }; this.AddChild(this.SwipePanels); foreach(Node panel in Panels) { this.AddChild(panel); } CreditsTitleText = new Label{ Text = "credits", Position = new Vector2(36.0f, 444.0f), FontMap = Crystallography.UI.FontManager.Instance.GetMap( Crystallography.UI.FontManager.Instance.GetInGame("Bariol", 72, "Regular") ) }; this.AddChild(CreditsTitleText); BackButton = new ButtonEntity(" back", MenuSystem, null, Support.TiledSpriteFromFile("Application/assets/images/blueBtn.png", 1, 3).TextureInfo, new Vector2i(0,0)); BackButton.label.FontMap = Crystallography.UI.FontManager.Instance.GetMap(Crystallography.UI.FontManager.Instance.GetInGame("Bariol", 36, "Bold") ); BackButton.setPosition(816.0f, 35.0f); this.AddChild(BackButton.getNode()); }
// METHODS --------------------------------------------------------------------------------------- private void Initialize() { _initialized = true; FontMap map = Crystallography.UI.FontManager.Instance.GetMap( Crystallography.UI.FontManager.Instance.GetInGame("Bariol", 48) ); Background = Support.SpriteUVFromFile("/Application/assets/images/UI/levelComplete.png"); Background.Position = new Vector2(90.0f, 94.0f); this.AddChild(Background); YourScoreText = new Label("1234567890", map); YourScoreText.Position = new Vector2(276.0f, 190.0f); this.AddChild(YourScoreText); BestScoreText = new Label("1234567890", map); BestScoreText.Position = new Vector2(656.0f, 190.0f); this.AddChild(BestScoreText); YourTimeText = new Label("00:00.0", map); YourTimeText.Position = new Vector2(276.0f, 125.0f); this.AddChild(YourTimeText); BestTimeText = new Label("00:00.0", map); BestTimeText.Position = new Vector2(656.0f, 125.0f); this.AddChild(BestTimeText); NextLevelButton = new ButtonEntity("", _scene, GamePhysics.Instance, Support.TiledSpriteFromFile("Application/assets/images/nextLevel.png", 1, 3).TextureInfo, new Vector2i(0,0)); NextLevelButton.setPosition(674, 35); this.AddChild(NextLevelButton.getNode()); LevelSelectButton = new ButtonEntity("", _scene, GamePhysics.Instance, Support.TiledSpriteFromFile("Application/assets/images/levelSelectBtn.png", 1, 3).TextureInfo, new Vector2i(0,0)); LevelSelectButton.setPosition(372, 35); this.AddChild(LevelSelectButton.getNode()); QuitButton = new ButtonEntity("", _scene, GamePhysics.Instance, Support.TiledSpriteFromFile("Application/assets/images/quit_game.png", 1, 3).TextureInfo, new Vector2i(0,0)); QuitButton.setPosition(181, 35); this.AddChild(QuitButton.getNode ()); #if DEBUG Console.WriteLine(GetType().ToString() + " created" ); #endif }
// CONSTRUCTORS --------------------------------------------------------------------------------------------------------------------------- public InstructionsScreen(MenuSystemScene pMenuSystem) { MenuSystem = pMenuSystem; Panels = new List<Node>{ new InstructionsPage1(), new InstructionsPage2(), new InstructionsPage3(), new InstructionsPage4(), new InstructionsPage5(), new InstructionsPage8(), new InstructionsPage7() }; this.SwipePanels = new SwipePanels(Panels) { // Position = new Vector2(18.0f, 33.0f) }; this.AddChild(this.SwipePanels); foreach (Node panel in Panels) { this.AddChild(panel); } BackButton = new ButtonEntity(" back", MenuSystem, null, Support.TiledSpriteFromFile("Application/assets/images/blueBtn.png", 1, 3).TextureInfo, new Vector2i(0,0)); BackButton.label.FontMap = Crystallography.UI.FontManager.Instance.GetMap(Crystallography.UI.FontManager.Instance.GetInGame("Bariol", 36, "Bold") ); BackButton.setPosition(816.0f, 35.0f); this.AddChild(BackButton.getNode()); }