Some improvements (Physics in Level 3 still not fixed, added some debugging)
This commit is contained in:
parent
6c8cdd2af2
commit
148c1f9b83
21
3/3.cs
21
3/3.cs
@ -101,11 +101,17 @@ namespace LaptopSimulator2015.Levels
|
||||
Rect tr = new Rect(targ, new Vector2(power, power), true);
|
||||
for (int i = 0; i < targets.Count; i++)
|
||||
{
|
||||
if (targets[i].distanceToRectSquared(tr) <= 400)
|
||||
if (targets[i].distanceToRectSquared(tr) <= 676)
|
||||
targetsToRemove.Add(targets[i]);
|
||||
}
|
||||
targets = targets.Except(targetsToRemove.Distinct()).Distinct().ToList();
|
||||
g.DrawRectangle(tr, Color.White);
|
||||
|
||||
g.DrawSizedString("TL", 10, tr.topLeftPoint.toPointF(), Brushes.Yellow);
|
||||
g.DrawSizedString("TR", 10, tr.topRightPoint.toPointF(), Brushes.Yellow);
|
||||
g.DrawSizedString("BL", 10, tr.bottomLeftPoint.toPointF(), Brushes.Yellow);
|
||||
g.DrawSizedString("BR", 10, tr.bottomRightPoint.toPointF(), Brushes.Yellow);
|
||||
g.DrawSizedString("CT", 10, tr.Location.toPointF(), Brushes.Blue);
|
||||
power = 10;
|
||||
}
|
||||
targ = new Vector2(center);
|
||||
@ -153,14 +159,11 @@ namespace LaptopSimulator2015.Levels
|
||||
g.DrawLine(center, cannon, Color.Green, 5);
|
||||
for (int i = 0; i < targets.Count; i++)
|
||||
{
|
||||
g.DrawRectangle(new Rect(targets[i], new Vector2(20, 20), true), Color.AliceBlue);
|
||||
|
||||
g.g.DrawEllipse(new Pen(new SolidBrush(Color.Red), 6), new RectangleF(Misc.d2f(targets[i].X - 10), Misc.d2f(minigamePanel.Height - 10 - targets[i].Y), 20, 20));
|
||||
g.g.DrawEllipse(new Pen(new SolidBrush(Color.White), 6), new RectangleF(Misc.d2f(targets[i].X - 7), Misc.d2f(minigamePanel.Height - 7 - targets[i].Y), 14, 14));
|
||||
g.g.FillEllipse(new SolidBrush(Color.Red), new RectangleF(Misc.d2f(targets[i].X - 3), Misc.d2f(minigamePanel.Height - 3 - targets[i].Y), 6, 6));
|
||||
|
||||
g.DrawLine(new Vector2(targets[i].X - 13, targets[i].Y + 15), new Vector2(targets[i].X + 13, targets[i].Y + 15), Color.Gray, 3);
|
||||
g.DrawLine(new Vector2(targets[i].X - 13, targets[i].Y + 15), new Vector2(targets[i].X + ((((double)targets[i].Tag) * 0.2) - 12.9) + 0.1, targets[i].Y + 15), Color.Red, 3);
|
||||
g.DrawEllipse(new Rect(targets[i], new Vector2(26, 26), true), Color.Red);
|
||||
g.DrawEllipse(new Rect(targets[i], new Vector2(13, 13), true), Color.White, false, 4.333f);
|
||||
Vector2 mp = new Vector2(targets[i].X + ((((double)targets[i].Tag) * 0.2) - 12.9) + 0.1, targets[i].Y + 15);
|
||||
g.DrawLine(mp, new Vector2(targets[i].X + 13, targets[i].Y + 15), Color.Gray, 3);
|
||||
g.DrawLine(new Vector2(targets[i].X - 13, targets[i].Y + 15), mp, Color.Red, 3);
|
||||
}
|
||||
if (firing)
|
||||
{
|
||||
|
7
4/4.cs
7
4/4.cs
@ -188,9 +188,12 @@ namespace LaptopSimulator2015.Levels
|
||||
g.DrawRectangle(new Rect(player, new Vector2(10, 10), true), Color.Green);
|
||||
if (lazorTime >= 0 && lazorTime <= 80)
|
||||
{
|
||||
g.DrawRectangle(new RectangleF((float)lazor, minigamePanel.Height / 2, 2, minigamePanel.Height), Color.DarkGray);
|
||||
float m = (float)Misc.map(0, 80, 0, minigamePanel.Height, lazorTime);
|
||||
g.DrawRectangle(new RectangleF((float)lazor, minigamePanel.Height - m / 2, 2, m), Color.Red);
|
||||
Vector2 mp = new Vector2(lazor, m);
|
||||
g.DrawLine(mp, new Vector2(lazor, 0), Color.DarkGray, 2);
|
||||
g.DrawLine(new Vector2(lazor, minigamePanel.Height), mp, Color.Red, 2);
|
||||
//g.DrawRectangle(new RectangleF((float)lazor, minigamePanel.Height / 2, 2, minigamePanel.Height), Color.DarkGray);
|
||||
//g.DrawRectangle(new RectangleF((float)lazor, minigamePanel.Height - m / 2, 2, m), Color.Red);
|
||||
}
|
||||
for (int i = 0; i < platforms.Count; i++)
|
||||
g.DrawRectangle(new Rect(platforms[i], new Vector2(100, 10), true), Color.White);
|
||||
|
@ -77,7 +77,7 @@ namespace Base
|
||||
/// <param name="centered">Whether the rectangle should be drawn centered rather than down-left</param>
|
||||
/// <param name="filled">Whether the rectangle should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawRectangle(RectangleF rectangle, Color color, bool centered = true, bool transform = true, bool filled = true, int unfilledLineSize = 1)
|
||||
public void DrawRectangle(RectangleF rectangle, Color color, bool centered = true, bool transform = true, bool filled = true, float unfilledLineSize = 1)
|
||||
{
|
||||
RectangleF r = rectangle;
|
||||
if (transform)
|
||||
@ -100,7 +100,40 @@ namespace Base
|
||||
/// <param name="color">The color of the rectangle</param>
|
||||
/// <param name="filled">Whether the rectangle should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawRectangle(Rect rectangle, Color color, bool filled = true, int unfilledLineSize = 1) => DrawRectangle(rectangle.toRectangleF(), color, false, true, filled, unfilledLineSize);
|
||||
public void DrawRectangle(Rect rectangle, Color color, bool filled = true, float unfilledLineSize = 1) => DrawRectangle(rectangle.toRectangleF(), color, false, true, filled, unfilledLineSize);
|
||||
|
||||
/// <summary>
|
||||
/// Draws an ellipse
|
||||
/// </summary>
|
||||
/// <param name="rectangle">Use the PointF/SizeF Constructor as it is much more logical</param>
|
||||
/// <param name="color">The color of the ellipse</param>
|
||||
/// <param name="centered">Whether the ellipse should be drawn centered rather than down-left</param>
|
||||
/// <param name="filled">Whether the ellipse should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawEllipse(RectangleF rectangle, Color color, bool centered = true, bool transform = true, bool filled = true, float unfilledLineSize = 1)
|
||||
{
|
||||
RectangleF r = rectangle;
|
||||
if (transform)
|
||||
r = w2s(r);
|
||||
Brush b = new SolidBrush(color);
|
||||
if (centered)
|
||||
{
|
||||
r = new RectangleF(new PointF(r.X - r.Width / 2, r.Y - r.Height / 2), r.Size);
|
||||
}
|
||||
if (filled)
|
||||
g.FillEllipse(b, r);
|
||||
else
|
||||
g.DrawEllipse(new Pen(b, unfilledLineSize), new Rectangle(Misc.f2i(r.X), Misc.f2i(r.Y), Misc.f2i(r.Width), Misc.f2i(r.Height)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws a ellipse
|
||||
/// </summary>
|
||||
/// <param name="rectangle">The rectangle to draw the ellipse in</param>
|
||||
/// <param name="color">The color of the ellipse</param>
|
||||
/// <param name="filled">Whether the ellipse should be filled</param>
|
||||
/// <param name="unfilledLineSize">The size of the lines used when not filling</param>
|
||||
public void DrawEllipse(Rect rectangle, Color color, bool filled = true, float unfilledLineSize = 1) => DrawEllipse(rectangle.toRectangleF(), color, false, true, filled, unfilledLineSize);
|
||||
|
||||
/// <summary>
|
||||
/// Draw a line connecting the vectors
|
||||
|
95
Base/Rect.cs
95
Base/Rect.cs
@ -3,12 +3,8 @@ using System.Drawing;
|
||||
|
||||
namespace Base
|
||||
{
|
||||
public class Rect
|
||||
public struct Rect
|
||||
{
|
||||
public Vector2 Location;
|
||||
public Vector2 Size;
|
||||
bool centered;
|
||||
|
||||
/// <summary>
|
||||
/// Create a rect from the provided data
|
||||
/// </summary>
|
||||
@ -27,14 +23,14 @@ namespace Base
|
||||
/// <param name="centered">Whether the Rect should be created top-right or around the Location</param>
|
||||
public Rect(double X, double Y, double Width, double Height, bool centered = false)
|
||||
{
|
||||
Location = new Vector2(X, Y);
|
||||
Size = new Vector2(Width, Height);
|
||||
this.centered = centered;
|
||||
if (this.centered)
|
||||
this.X = X;
|
||||
this.Y = Y;
|
||||
this.Width = Width;
|
||||
this.Height = Height;
|
||||
if (centered)
|
||||
{
|
||||
//Location -= Size / 2;
|
||||
Location.X -= Size.X / 2;
|
||||
Location.Y += Size.Y / 2;
|
||||
this.X -= Width / 2;
|
||||
this.Y += Height / 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,71 +40,36 @@ namespace Base
|
||||
/// <param name="rect"></param>
|
||||
public Rect(Rect rect)
|
||||
{
|
||||
Location = rect.Location;
|
||||
Size = rect.Size;
|
||||
centered = rect.centered;
|
||||
X = rect.X;
|
||||
Y = rect.Y;
|
||||
Width = rect.Width;
|
||||
Height = rect.Height;
|
||||
}
|
||||
/// <summary>
|
||||
/// Copies the Rect's data
|
||||
/// </summary>
|
||||
/// <param name="rect"></param>
|
||||
public Rect(Rectangle rect) : this(rect.X, rect.Y, rect.Width, rect.Height, false) { }
|
||||
public Rect(Rectangle rect, bool transform = false) : this(rect.X, rect.Y, rect.Width, rect.Height, false) { }
|
||||
/// <summary>
|
||||
/// Copies the Rect's data
|
||||
/// </summary>
|
||||
/// <param name="rect"></param>
|
||||
public Rect(RectangleF rect) : this(rect.X, rect.Y, rect.Width, rect.Height, false) { }
|
||||
public Rect(RectangleF rect, bool transform = false) : this(rect.X, rect.Y, rect.Width, rect.Height, false) { }
|
||||
|
||||
public double X
|
||||
{
|
||||
get => Location.X;
|
||||
set => Location.X = value;
|
||||
}
|
||||
|
||||
public double Y
|
||||
{
|
||||
get => Location.Y;
|
||||
set => Location.Y = value;
|
||||
}
|
||||
|
||||
public double Width
|
||||
{
|
||||
get => Size.X;
|
||||
set {
|
||||
if (centered)
|
||||
{
|
||||
double tmp = Size.X - value;
|
||||
Size.X = value;
|
||||
Location.X += tmp / 2;
|
||||
}
|
||||
else
|
||||
Size.X = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Height
|
||||
{
|
||||
get => Size.Y;
|
||||
set {
|
||||
if (centered)
|
||||
{
|
||||
double tmp = Size.Y - value;
|
||||
Size.Y = value;
|
||||
Location.Y += tmp / 2;
|
||||
}
|
||||
else
|
||||
Size.Y = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Bottom => Location.Y;
|
||||
public double Top => Location.Y + Size.Y;
|
||||
public double Left => Location.X;
|
||||
public double Right => Location.X + Size.X;
|
||||
public Vector2 bottomLeftPoint => new Vector2(Location);
|
||||
public Vector2 bottomRightPoint => new Vector2(Location.X, Location.Y + Size.Y);
|
||||
public Vector2 topLeftPoint => new Vector2(Location.X + Size.X, Location.Y);
|
||||
public Vector2 topRightPoint => Location + Size;
|
||||
public double X;
|
||||
public double Y;
|
||||
public double Width;
|
||||
public double Height;
|
||||
public Vector2 Location => new Vector2(X, Y);
|
||||
public Vector2 Size => new Vector2(Width, Height);
|
||||
public double Bottom => Y;
|
||||
public double Top => Y + Height;
|
||||
public double Left => X;
|
||||
public double Right => X + Width;
|
||||
public Vector2 bottomLeftPoint => new Vector2(Left, Bottom);
|
||||
public Vector2 topLeftPoint => new Vector2(Left, Top);
|
||||
public Vector2 bottomRightPoint => new Vector2(Right, Bottom);
|
||||
public Vector2 topRightPoint => new Vector2(Right, Top);
|
||||
public bool doOverlap(Rect other) => (Left <= other.Right && other.Left <= Right) || (Left >= other.Right && other.Left >= Right);
|
||||
public Rectangle toRectangle() => new Rectangle(Misc.d2i(X), Misc.d2i(Y), Misc.d2i(Width), Misc.d2i(Height));
|
||||
public RectangleF toRectangleF() => new RectangleF(Misc.d2f(X), Misc.d2f(Y), Misc.d2f(Width), Misc.d2f(Height));
|
||||
|
40
LaptopSimulator2015/FakeDesktop.Designer.cs
generated
40
LaptopSimulator2015/FakeDesktop.Designer.cs
generated
@ -97,6 +97,8 @@ namespace LaptopSimulator2015
|
||||
this.devWindowHeaderExit = new System.Windows.Forms.Label();
|
||||
this.devWindowIcon = new System.Windows.Forms.Panel();
|
||||
this.devWindowTitle = new System.Windows.Forms.Label();
|
||||
this.optionsWindowQualityLabel = new System.Windows.Forms.Label();
|
||||
this.optionsWindowQualityBox = new System.Windows.Forms.ComboBox();
|
||||
this.winMenuPanel.SuspendLayout();
|
||||
this.winTaskbar.SuspendLayout();
|
||||
this.winDesktop.SuspendLayout();
|
||||
@ -327,10 +329,10 @@ namespace LaptopSimulator2015
|
||||
this.levelWindow2.Controls.Add(this.captchaBox);
|
||||
this.levelWindow2.Controls.Add(this.captchaPanel);
|
||||
this.levelWindow2.Controls.Add(this.levelWindowText2);
|
||||
this.levelWindow2.Location = new System.Drawing.Point(4, 25);
|
||||
this.levelWindow2.Location = new System.Drawing.Point(4, 14);
|
||||
this.levelWindow2.Name = "levelWindow2";
|
||||
this.levelWindow2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.levelWindow2.Size = new System.Drawing.Size(494, 219);
|
||||
this.levelWindow2.Size = new System.Drawing.Size(494, 230);
|
||||
this.levelWindow2.TabIndex = 1;
|
||||
this.levelWindow2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -368,9 +370,9 @@ namespace LaptopSimulator2015
|
||||
//
|
||||
this.levelWindow3.Controls.Add(this.levelWindowProgress);
|
||||
this.levelWindow3.Controls.Add(this.levelWindowText3);
|
||||
this.levelWindow3.Location = new System.Drawing.Point(4, 25);
|
||||
this.levelWindow3.Location = new System.Drawing.Point(4, 14);
|
||||
this.levelWindow3.Name = "levelWindow3";
|
||||
this.levelWindow3.Size = new System.Drawing.Size(494, 219);
|
||||
this.levelWindow3.Size = new System.Drawing.Size(494, 230);
|
||||
this.levelWindow3.TabIndex = 2;
|
||||
this.levelWindow3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -486,6 +488,8 @@ namespace LaptopSimulator2015
|
||||
// optionsWindow
|
||||
//
|
||||
this.optionsWindow.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowQualityBox);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowQualityLabel);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowCredit);
|
||||
this.optionsWindow.Controls.Add(this.devWindowOpen);
|
||||
this.optionsWindow.Controls.Add(this.optionsWindowReset);
|
||||
@ -597,7 +601,7 @@ namespace LaptopSimulator2015
|
||||
//
|
||||
this.optionsWindowWam.Location = new System.Drawing.Point(108, 26);
|
||||
this.optionsWindowWam.Name = "optionsWindowWam";
|
||||
this.optionsWindowWam.Size = new System.Drawing.Size(380, 45);
|
||||
this.optionsWindowWam.Size = new System.Drawing.Size(271, 45);
|
||||
this.optionsWindowWam.TabIndex = 1;
|
||||
this.optionsWindowWam.TabStop = false;
|
||||
this.optionsWindowWam.Scroll += new System.EventHandler(this.OptionsWindowWam_Scroll);
|
||||
@ -792,6 +796,30 @@ namespace LaptopSimulator2015
|
||||
this.devWindowTitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DevWindowHeader_MouseMove);
|
||||
this.devWindowTitle.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DevWindowHeader_MouseUp);
|
||||
//
|
||||
// optionsWindowQualityLabel
|
||||
//
|
||||
this.optionsWindowQualityLabel.AutoSize = true;
|
||||
this.optionsWindowQualityLabel.Location = new System.Drawing.Point(385, 23);
|
||||
this.optionsWindowQualityLabel.Name = "optionsWindowQualityLabel";
|
||||
this.optionsWindowQualityLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.optionsWindowQualityLabel.TabIndex = 10;
|
||||
this.optionsWindowQualityLabel.Text = "Quality:";
|
||||
//
|
||||
// optionsWindowQualityBox
|
||||
//
|
||||
this.optionsWindowQualityBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.optionsWindowQualityBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.optionsWindowQualityBox.FormattingEnabled = true;
|
||||
this.optionsWindowQualityBox.Items.AddRange(new object[] {
|
||||
"Sh*t",
|
||||
"Default",
|
||||
"Good"});
|
||||
this.optionsWindowQualityBox.Location = new System.Drawing.Point(385, 36);
|
||||
this.optionsWindowQualityBox.Name = "optionsWindowQualityBox";
|
||||
this.optionsWindowQualityBox.Size = new System.Drawing.Size(103, 21);
|
||||
this.optionsWindowQualityBox.TabIndex = 11;
|
||||
this.optionsWindowQualityBox.TabStop = false;
|
||||
//
|
||||
// FakeDesktop
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -905,5 +933,7 @@ namespace LaptopSimulator2015
|
||||
private System.Windows.Forms.Button devWindowSkip;
|
||||
private System.Windows.Forms.Button optionsWindowCredit;
|
||||
private System.Windows.Forms.Button devWindowOverlay;
|
||||
private System.Windows.Forms.Label optionsWindowQualityLabel;
|
||||
private System.Windows.Forms.ComboBox optionsWindowQualityBox;
|
||||
}
|
||||
}
|
@ -47,6 +47,12 @@ namespace LaptopSimulator2015
|
||||
optionsWindowWamLabel.Text = strings.optionsWindowWam;
|
||||
optionsWindowReset.Text = strings.optionsWindowReset;
|
||||
optionsWindowSubs.Text = strings.optionsWindowSubs;
|
||||
optionsWindowQualityBox.Items[0] = strings.optionsWindowQuality1;
|
||||
optionsWindowQualityBox.Items[1] = strings.optionsWindowQuality2;
|
||||
optionsWindowQualityBox.Items[2] = strings.optionsWindowQuality3;
|
||||
Text = strings.fakeDesktopTitle;
|
||||
winMenuStart.Text = strings.start;
|
||||
winMenuText.Text = strings.winMenuText;
|
||||
levelWindow.Visible = false;
|
||||
minigamePanel.Visible = false;
|
||||
optionsWindow.Visible = false;
|
||||
@ -90,10 +96,7 @@ namespace LaptopSimulator2015
|
||||
tmpoptionslsdcanchange = Settings.lsd;
|
||||
optionsWindowLSD.Checked = Settings.lsd;
|
||||
optionsWindowSubs.Checked = Settings.subs;
|
||||
Text = strings.fakeDesktopTitle;
|
||||
winMenuExit.Text = strings.exit;
|
||||
winMenuStart.Text = strings.start;
|
||||
winMenuText.Text = strings.winMenuText;
|
||||
optionsWindowQualityBox.SelectedIndex = Settings.quality;
|
||||
levelWindowTitle.Text = "";
|
||||
winTimeLabel.Text = DateTime.Now.ToString("hh:mm:ss", Settings.lang);
|
||||
fans = new SoundPlayer(Resources.fans);
|
||||
@ -538,6 +541,7 @@ namespace LaptopSimulator2015
|
||||
Settings.wam = optionsWindowWam.Value;
|
||||
Settings.lsd = optionsWindowLSD.Checked;
|
||||
Settings.subs = optionsWindowSubs.Checked;
|
||||
Settings.quality = optionsWindowQualityBox.SelectedIndex;
|
||||
int NewVolume = ((ushort.MaxValue / 10) * Settings.wam);
|
||||
uint NewVolumeAllChannels = ((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16);
|
||||
waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);
|
||||
|
@ -13,6 +13,7 @@ namespace LaptopSimulator2015 {
|
||||
xmldoc_temp.Add(new XElement("lsd", lsd));
|
||||
xmldoc_temp.Add(new XElement("subs", subs));
|
||||
xmldoc_temp.Add(new XElement("level", level));
|
||||
xmldoc_temp.Add(new XElement("quality", quality));
|
||||
xmldoc_temp.Add(new XElement("lang", lang));
|
||||
xmldoc_temp.Save(_xmlfile);
|
||||
}
|
||||
@ -25,6 +26,7 @@ namespace LaptopSimulator2015 {
|
||||
xmldoc_temp.Add(new XElement("lsd", false));
|
||||
xmldoc_temp.Add(new XElement("subs", true));
|
||||
xmldoc_temp.Add(new XElement("level", -1));
|
||||
xmldoc_temp.Add(new XElement("quality", 1));
|
||||
xmldoc_temp.Add(new XElement("lang", CultureInfo.CurrentCulture));
|
||||
xmldoc_temp.Save(_xmlfile);
|
||||
}
|
||||
@ -33,12 +35,14 @@ namespace LaptopSimulator2015 {
|
||||
lsd = bool.Parse(xmldoc.Element("lsd").Value);
|
||||
subs = bool.Parse(xmldoc.Element("subs").Value);
|
||||
level = int.Parse(xmldoc.Element("level").Value);
|
||||
quality = int.Parse(xmldoc.Element("quality").Value);
|
||||
lang = CultureInfo.GetCultureInfo(xmldoc.Element("lang").Value);
|
||||
}
|
||||
public static int wam;
|
||||
public static bool lsd;
|
||||
public static bool subs;
|
||||
public static int level;
|
||||
public static int quality;
|
||||
public static CultureInfo lang;
|
||||
}
|
||||
}
|
27
LaptopSimulator2015/strings.Designer.cs
generated
27
LaptopSimulator2015/strings.Designer.cs
generated
@ -195,6 +195,33 @@ namespace LaptopSimulator2015 {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sh*t.
|
||||
/// </summary>
|
||||
internal static string optionsWindowQuality1 {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowQuality1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default.
|
||||
/// </summary>
|
||||
internal static string optionsWindowQuality2 {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowQuality2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Good.
|
||||
/// </summary>
|
||||
internal static string optionsWindowQuality3 {
|
||||
get {
|
||||
return ResourceManager.GetString("optionsWindowQuality3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reset.
|
||||
/// </summary>
|
||||
|
@ -162,6 +162,15 @@
|
||||
<data name="optionsWindowLSDWarning" xml:space="preserve">
|
||||
<value>Bist du dir sicher? (ALLES wird verbuggt werden!)</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality1" xml:space="preserve">
|
||||
<value>Müll</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality2" xml:space="preserve">
|
||||
<value>Standard</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality3" xml:space="preserve">
|
||||
<value>Supremo</value>
|
||||
</data>
|
||||
<data name="optionsWindowReset" xml:space="preserve">
|
||||
<value>Zurücksetzen</value>
|
||||
</data>
|
||||
|
@ -162,6 +162,15 @@
|
||||
<data name="optionsWindowLSDWarning" xml:space="preserve">
|
||||
<value>Are you SURE?\r\n(This will break EVERYTHING!)</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality1" xml:space="preserve">
|
||||
<value>Sh*t</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality2" xml:space="preserve">
|
||||
<value>Default</value>
|
||||
</data>
|
||||
<data name="optionsWindowQuality3" xml:space="preserve">
|
||||
<value>Good</value>
|
||||
</data>
|
||||
<data name="optionsWindowReset" xml:space="preserve">
|
||||
<value>Reset</value>
|
||||
</data>
|
||||
|
3
LevelTest/MainForm.Designer.cs
generated
3
LevelTest/MainForm.Designer.cs
generated
@ -57,11 +57,12 @@
|
||||
this.Controls.Add(this.minigamePanel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "MainForm";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "Form1";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -46,5 +46,21 @@ namespace LevelTest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isFClose = true;
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
isFClose = false;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (isFClose)
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,10 +42,13 @@ namespace LevelTest
|
||||
throw new Exception("Please select a folder");
|
||||
}
|
||||
}
|
||||
Minigame[] levels = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll", SearchOption.AllDirectories).Where(s => Path.GetFileName(s) != "Base.dll" && Path.GetFileName(s) != "CC-Functions.W32.dll")
|
||||
.Select(s => Assembly.LoadFrom(s)).SelectMany(s => s.GetTypes()).Distinct()
|
||||
.Where(p => typeof(Minigame).IsAssignableFrom(p)).Distinct().Except(new Type[] { typeof(Minigame), typeof(Level), typeof(Goal) })
|
||||
.Select(s => (Minigame)Activator.CreateInstance(s)).OrderBy(lv => lv.availableAfter).ToArray();
|
||||
Minigame[] levels = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll", SearchOption.AllDirectories)
|
||||
.Where(s => Path.GetFileName(s) != "Base.dll" && Path.GetFileName(s) != "CC-Functions.W32.dll").Select(s => File.ReadAllBytes(s))
|
||||
.Distinct().Select(s => Assembly.Load(s)).Distinct().SelectMany(s => s.GetTypes()).Distinct().Where(p => typeof(Minigame).IsAssignableFrom(p))
|
||||
.Distinct().Except(new Type[] { typeof(Minigame), typeof(Level), typeof(Goal) }).Select(s => (Minigame)Activator.CreateInstance(s))
|
||||
.Distinct(new comp()).OrderBy(lv => lv.availableAfter).ToArray();
|
||||
while (true)
|
||||
{
|
||||
Minigame level;
|
||||
if (levels.Length == 0)
|
||||
throw new Exception("No Levels found!");
|
||||
@ -63,10 +66,20 @@ namespace LevelTest
|
||||
}
|
||||
Application.Run(new MainForm(level));
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class comp : IEqualityComparer<Minigame>
|
||||
{
|
||||
public bool Equals(Minigame x, Minigame y) => x.name == y.name;
|
||||
|
||||
public int GetHashCode(Minigame x) => x.name.GetHashCode();
|
||||
|
||||
}
|
||||
}
|
||||
|
14
ToDo.txt
14
ToDo.txt
@ -1,2 +1,14 @@
|
||||
Implement drawing ellipses (Level 3)
|
||||
Fix Physics weirdness in Level 3
|
||||
Fix Physics weirdness in Level 4 (dropping through ground)
|
||||
|
||||
Ideas for content:
|
||||
- Goals:
|
||||
- MS Word = Sentenz
|
||||
- Powerpoint = WeakClic
|
||||
- Minecraft = InfiniMined
|
||||
- The "you win"-button
|
||||
- Minigames:
|
||||
- Bullet-Hell
|
||||
- Mouse-based games?
|
||||
- Other:
|
||||
- Possibly secrets and alternate paths?
|
BIN
tmp1/3g.dll
BIN
tmp1/3g.dll
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user