diff options
| author | lempamo <[email protected]> | 2017-08-05 21:14:30 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-05 21:14:30 -0400 |
| commit | a66494723ce44ed7eb38ebef83f59468b7279c2d (patch) | |
| tree | a043441698b1c75f505de6ffed1ab866feed96bd /TimeHACK.Main/AchievementBox.cs | |
| parent | bc8577b76162054e47e93f0ada8b2fedf95cd80a (diff) | |
| download | histacom2-a66494723ce44ed7eb38ebef83f59468b7279c2d.tar.gz histacom2-a66494723ce44ed7eb38ebef83f59468b7279c2d.tar.bz2 histacom2-a66494723ce44ed7eb38ebef83f59468b7279c2d.zip | |
added real achievements
Diffstat (limited to 'TimeHACK.Main/AchievementBox.cs')
| -rw-r--r-- | TimeHACK.Main/AchievementBox.cs | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/TimeHACK.Main/AchievementBox.cs b/TimeHACK.Main/AchievementBox.cs new file mode 100644 index 0000000..0d033c6 --- /dev/null +++ b/TimeHACK.Main/AchievementBox.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TimeHACK.Engine; + +namespace TimeHACK +{ + public partial class AchievementBox : Form + { + private bool stayOnScreen = false; + + public AchievementBox(int type) + { + InitializeComponent(); + switch (type) + { + case 0: //Piracy Ending + BackgroundImage = Properties.Resources.EndingPiracy; + stayOnScreen = true; + break; + case 20: + BackgroundImage = Properties.Resources.AchievementMines; + break; + } + Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - 202, -102); + while (this.Location.Y != 0) + { + Thread.Sleep(25); + Location = new Point(Location.X, Location.Y + 1); + } + if (!stayOnScreen) + { + Thread.Sleep(5000); + while (this.Location.Y != -102) + { + Thread.Sleep(25); + Location = new Point(Location.X, Location.Y - 1); + } + this.Close(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + Program.title.Show(); + SaveSystem.CurrentSave = null; + SaveSystem.currentTheme = null; + foreach (Form f in Application.OpenForms) if (!(f is TitleScreen) && !(f is AchievementBox)) f.Close(); + this.Close(); + } + } +} |
