diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2017-12-29 17:27:49 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2017-12-29 17:27:49 +0100 |
| commit | da38e93e55b6ff46a53dcd9d2be393149089d329 (patch) | |
| tree | c19fdb964ee6f8dd8dd3102b22de541828850983 /Penguloon/Scenes | |
| parent | 5373e919a0d9e389fc2076963f610d044c21ccb5 (diff) | |
obejct info, new level selector, credits haHA
Diffstat (limited to 'Penguloon/Scenes')
| -rw-r--r-- | Penguloon/Scenes/CreditsScene.cs | 182 | ||||
| -rw-r--r-- | Penguloon/Scenes/GameScene.cs | 2 | ||||
| -rw-r--r-- | Penguloon/Scenes/MenuScene.cs | 14 | ||||
| -rw-r--r-- | Penguloon/Scenes/StatsScene.cs | 6 |
4 files changed, 199 insertions, 5 deletions
diff --git a/Penguloon/Scenes/CreditsScene.cs b/Penguloon/Scenes/CreditsScene.cs new file mode 100644 index 0000000..f07e5e1 --- /dev/null +++ b/Penguloon/Scenes/CreditsScene.cs @@ -0,0 +1,182 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input.Touch; +using Penguloon.Scenes; +using System; +using System.Collections.Generic; + +namespace Penguloon.Scenes +{ + class CreditsScene : SceneBase + { + public float PosY { get; set; } + + public SpriteFont Font { get; set; } + public int TextHeight { get; set; } + + public DateTime ViewDate { get; set; } + + public CreditsScene(Main main) : base(main) + { + Font = ContentManager.GetFont(StaticUIValues.StatsFont); + TextHeight = (int)Font.MeasureString("zulul").Y * 2; + + ViewDate = DateTime.Now; + } + + public override void CreateControls() + { + + } + + public override void Draw(float deltaTime) + { + base.Draw(deltaTime); + + // background + Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/background"), + destinationRectangle: new Rectangle(0, 0, (int)StaticUIValues.ScreenViewport.X, (int)StaticUIValues.ScreenViewport.Y)); + + DrawSnowflakes(); + + DrawCredits(); + } + + public List<string> CreditList { get; set; } = new List<string>() + { + "Executive Producer", + "Team Lead", + "Art Director", + "Creative Director", + "Lead Animator", + "Lead Artist", + "Lead Character Artist", + "Lead Designer", + "Load Programmer", + "Lead Technical Artist", + "Producer", + "Additional Production", + "Programming", + "Additional Programming", + "Level Designer", + "Sound Producer", + "Audio Supervisor", + "lead Composer", + "Lead Sound Designer", + "Music", + "Sound Design", + "Sound Editor", + "Quality Assurance Manager", + "Test Coordinator", + "Test Leads", + "Lead Game Testers", + "Game Testers", + "Senior Lead Testers", + "Additional Game Testing", + "In-Game Support Team", + "Marketing Team", + "Legal Manager", + "President", + "CEO", + "Commercial Director", + "Sales Manager", + "Marketing Manager", + "PR Manager", + "Logistics", + "Sales Director", + "Product Manager", + "Managing Director", + "Community Manager", + "Vice President", + "Trade Marketing", + "Social Media Executive", + "Publishing", + "Associate Tools Engineer", + "Digital Coordinator", + "IP Strategy", + "Digital Business Manager", + "Digital Coordinator", + "Adinistration", + "Administrative Assistant", + "Operations Analyst", + "Applications Support Specialist", + "Travel Adinistrator", + "Senior Vice President", + "Director of Retail Marketing", + "E-Commerce Specialist", + "Brand Marketing", + "Brand Manager", + "Event Manager", + "Event Planner", + "Community Specialist", + "Interactive Designer", + "Senior Associate Attorney", + "QA Manager", + "QA Project Leads", + "CQC Manager", + "Senior CQC Coordinator", + "CQC Coordinators", + "CQC Testers", + "Digital Content Manager", + "Finaince Manager", + "Accountant", + "Sales Representative", + "Business Administrator", + "Marketing Assistant", + "Localization Manager", + "Product Support", + "Business Development", + "Special Thanks", + }; + + private void DrawCredits() + { + int marginTop = (int)(StaticUIValues.ScreenViewport.Y / 2) + (int)PosY; + string name = "Aldrik Ramaekers"; + + Color headerForeColor = Color.FromNonPremultiplied(111, 138, 183, 255); + Color headerBackColor = Color.Black; + + Color nameForeColor = Color.White; + Color nameBackColor = Color.Black; + + // game design + DrawText(Font, "Game Design", new Vector2(0, marginTop + TextHeight), new Vector2(StaticUIValues.ScreenViewport.X, 0), TextAllignment.CenterTop, headerForeColor, headerBackColor, 2); + DrawText(Font, name, new Vector2(0, marginTop + TextHeight + (TextHeight / 2)), new Vector2(StaticUIValues.ScreenViewport.X, 0), TextAllignment.CenterTop, nameForeColor, nameBackColor, 2); + + for (int i = 0; i < CreditList.Count; i++) + { + int posX = i % 2 == 0 ? 100 : (int)StaticUIValues.ScreenViewport.X - 100; + TextAllignment align = i % 2 == 0 ? TextAllignment.LeftTop : TextAllignment.RightTop; + + int index = i + 2; + + int posY = marginTop + ((int)(TextHeight * 0.7) * (index * 2)); + + if (posY < -200) continue; + if (posY > StaticUIValues.ScreenViewport.Y) break; + + if (i == CreditList.Count - 1) + name = "My cat"; + else + name = "Aldrik Ramaekers"; + + // executive producer + DrawText(Font, CreditList[i], new Vector2(posX, posY), new Vector2(0, 0), align, headerForeColor, headerBackColor, 2); + DrawText(Font, name, new Vector2(posX, posY + (TextHeight / 2)), new Vector2(0, 0), align, nameForeColor, nameBackColor, 2); + } + } + + public override void Update(float deltaTime, TouchLocation[] touchLocations) + { + base.Update(deltaTime, touchLocations); + + if (touchLocations.Length != 0) + if ((DateTime.Now - ViewDate).TotalMilliseconds > 200) + SceneManager.SelectedScene = SelectedScene.Menu; + + PosY -= 100 * deltaTime; + } + } +}
\ No newline at end of file diff --git a/Penguloon/Scenes/GameScene.cs b/Penguloon/Scenes/GameScene.cs index 7248730..5412147 100644 --- a/Penguloon/Scenes/GameScene.cs +++ b/Penguloon/Scenes/GameScene.cs @@ -110,7 +110,7 @@ namespace Penguloon.Scenes private void DrawUI(float deltaTime) { //background - Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/red"), + Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/objectSelectionBackground"), destinationRectangle: new Rectangle(Level.Map.MapWidth + StaticUIValues.BorderWidth, 0, (int)StaticUIValues.ScreenViewport.X - (Level.Map.MapWidth + StaticUIValues.BorderWidth), (int)StaticUIValues.ScreenViewport.Y)); diff --git a/Penguloon/Scenes/MenuScene.cs b/Penguloon/Scenes/MenuScene.cs index 7957151..cab9f8c 100644 --- a/Penguloon/Scenes/MenuScene.cs +++ b/Penguloon/Scenes/MenuScene.cs @@ -22,11 +22,24 @@ namespace Penguloon.Scenes new Vector2((StaticUIValues.ScreenViewport.X - StaticUIValues.MenuButtonSize.X) / 2, 100 + StaticUIValues.MenuButtonSize.Y + 25), StaticUIValues.MenuButtonSize, Main.Resources.GetString(Resource.String.MenuBtnStats)); + Button btnCredits = new Button(this, + new Vector2((StaticUIValues.ScreenViewport.X - StaticUIValues.MenuButtonSize.X) / 2, 100 + (StaticUIValues.MenuButtonSize.Y * 2) + (25 * 2)), + StaticUIValues.MenuButtonSize, Main.Resources.GetString(Resource.String.MenuBtnCredits)); + btnStart.OnClick += BtnStart_OnClick; btnStats.OnClick += BtnStats_OnClick; + btnCredits.OnClick += BtnCredits_OnClick; Controls.Add(btnStart); Controls.Add(btnStats); + Controls.Add(btnCredits); + } + + private void BtnCredits_OnClick(object sender, ClickArgs e) + { + SceneManager.CreditsScene = new CreditsScene(Main); + + SceneManager.SelectedScene = SelectedScene.Credits; } private void BtnStats_OnClick(object sender, ClickArgs e) @@ -39,7 +52,6 @@ namespace Penguloon.Scenes private void BtnStart_OnClick(object sender, ClickArgs e) { - if(SceneManager.LevelSelectionScene == null) SceneManager.LevelSelectionScene = new LevelSelectionScene(Main); SceneManager.SelectedScene = SelectedScene.LevelSelection; diff --git a/Penguloon/Scenes/StatsScene.cs b/Penguloon/Scenes/StatsScene.cs index 948e77f..f6885d8 100644 --- a/Penguloon/Scenes/StatsScene.cs +++ b/Penguloon/Scenes/StatsScene.cs @@ -64,7 +64,7 @@ namespace Penguloon.Scenes Main.Resources.GetString(Resource.String.StatsTotalStatsTitle), new Vector2(120, borderHorizontalY), new Vector2(0, 0), - TextAllignment.LeftTop, Color.FromNonPremultiplied(200, 200, 200, 200), Color.Black, 2); + TextAllignment.LeftTop, Color.FromNonPremultiplied(111, 138, 183, 255), Color.Black, 2); int martinXRight = StaticUIValues.StatsMarginXRight; @@ -78,7 +78,7 @@ namespace Penguloon.Scenes Main.Resources.GetString(Resource.String.StatsLevel) + " ", new Vector2((int)StaticUIValues.ScreenViewport.X - martinXRight - ContentManager.GetFont(StaticUIValues.StatsFont).MeasureString(UserdataManager.Level.ToString()).X, 75), new Vector2(0, 0), - TextAllignment.RightTop, Color.FromNonPremultiplied(200, 200, 200, 200), Color.Black, 2); + TextAllignment.RightTop, Color.FromNonPremultiplied(111, 138, 183, 255), Color.Black, 2); // Total kills DrawText(ContentManager.GetFont(StaticUIValues.StatsFont), @@ -128,7 +128,7 @@ namespace Penguloon.Scenes Main.Resources.GetString(Resource.String.StatsBestStatsTitle), new Vector2(120, borderHorizontalY + 50 + (StaticUIValues.StatsSpacingY * 4)), new Vector2(0, 0), - TextAllignment.LeftTop, Color.FromNonPremultiplied(200, 200, 200, 200), Color.Black, 2); + TextAllignment.LeftTop, Color.FromNonPremultiplied(111, 138, 183, 255), Color.Black, 2); // Total kills DrawText(ContentManager.GetFont(StaticUIValues.StatsFont), |
