/blockade.sln |
---|
1,6 → 1,7 |
|
Microsoft Visual Studio Solution File, Format Version 9.00 |
# Visual C# Express 2005 |
# Visual Studio 2005 |
# SharpDevelop 3.1.1.5327 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "blockade", "blockade\blockade.csproj", "{FD7F3596-7C20-4113-B228-AE29FB379B2B}" |
EndProject |
Global |
/blockade/Form1.cs |
---|
378,6 → 378,7 |
public int lang; |
public bool extraPretty = false; |
public bool showTotalOfEngery = false; |
Random rnd = new Random(); |
public Form1(int language) |
861,7 → 862,7 |
StringFormat sf = new StringFormat(); |
sf.Alignment = StringAlignment.Center; |
//LOOSE TEXT |
// Texts |
if (lives <= 0) |
g.DrawString("You Loose!\nHAHAHA!", new Font(FontFamily.GenericMonospace, 40, FontStyle.Bold, GraphicsUnit.Pixel), new SolidBrush(controlFGColour), 250, 200, sf); |
868,6 → 869,10 |
if (detailText != "" && enemies.Count == 0) |
g.DrawString(textWrap(font1, detailText, 450), font1, new SolidBrush(controlFGColour), 250, 400 - TextRenderer.MeasureText(textWrap(font1, detailText, 450), font1).Height, sf); |
if (showTotalOfEngery) |
g.DrawString(energyTotal().ToString(), font1, new SolidBrush(controlFGColour), 10, 10); |
// Finals |
view.Image = (Image)img.Clone(); |
g.Dispose(); |
img.Dispose(); |
1024,8 → 1029,13 |
} |
else |
towers[num].targets.Clear(); |
for (int i = 0; i < enemies.Count; i++) |
int start = rnd.Next(0, enemies.Count - 1); |
int i; |
for (int inc = 0; inc < enemies.Count; inc++) |
{ |
i = inc + start; |
if (i >= enemies.Count) |
i -= enemies.Count; |
if (towerTypes[towers[num].type].laserType == 2 && towers[num].target != -1) |
res = enemies[i].loc.X >= 0 && getDist(FtoP(enemies[towers[num].targets[towers[num].targets.Count - 1]].loc), FtoP(enemies[i].loc)) <= towerTypes[towers[num].type].range && enemies[i].health > 0; |
else |
1046,6 → 1056,7 |
} |
} |
} |
// no target found |
if (towerTypes[towers[num].type].laserType != 2) |
towers[num].target = -1; |
} |
1139,6 → 1150,9 |
case Keys.E: |
extraPretty = !extraPretty; |
break; |
case Keys.T: |
showTotalOfEngery = !showTotalOfEngery; |
break; |
// case Keys.S: |
// sound = !sound; |
// break; |
1194,5 → 1208,13 |
enemies[num].imgTime = 0; |
return enemyTypes[enemies[num].type].getImg(enemies[num].imgTime); |
} |
public double energyTotal() |
{ |
double output = 0.0; |
for (int i = 0; i < towers.Count; i++) |
output += towers[i].energy; |
return output; |
} |
} |
} |
/blockade/bin/Debug/blockade.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/blockade/bin/Debug/blockade.pdb |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/blockade/Form2.cs |
---|
8,8 → 8,10 |
*/ |
using System; |
using System.Drawing; |
using System.Collections; |
using System.Collections.Generic; |
using System.Windows.Forms; |
using System.Resources; |
namespace blockade |
{ |
54,6 → 56,9 |
bool hover = false; |
Random rnd = new Random(); |
string keyPattern = ""; |
string story = "lmeh"; |
public Form2() |
{ |
// |
165,9 → 170,9 |
} |
else |
{ |
// credits |
Image tempImg; |
for (int i = 0; i < creditsList.Length; i++) |
{ |
if (scroll > i * cDelay && scroll < 100 + i * cDelay) |
239,6 → 244,26 |
void Form2KeyDown(object sender, KeyEventArgs e) |
{ |
this.Text = keyPattern; |
if (e.KeyCode == Keys.Back) |
{ |
if (keyPattern.ToLower().EndsWith("story")) |
{ |
setStory("blockadeStory.txt"); |
creditsList = story.Split('\n'); |
viewCredits(); |
} |
else if (keyPattern.ToLower().EndsWith("aremd0")) |
{ |
setStory("arem0.txt"); |
creditsList = story.Split('\n'); |
viewCredits(); |
} |
} |
keyPattern += e.KeyCode.ToString(); |
if (changeLang) |
{ |
if (e.KeyCode == Keys.Up) |
400,5 → 425,11 |
else |
hover = false; |
} |
public void setStory(string s) |
{ |
System.Net.WebClient wClient = new System.Net.WebClient(); |
story = wClient.DownloadString("http://tim32.org/~freddie/Blockade/" + s); |
} |
} |
} |
/blockade/obj/Debug/blockade.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/blockade/obj/Debug/blockade.csproj.GenerateResource.Cache |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/blockade/obj/Debug/blockade.pdb |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |