Large diffs are not rendered by default.

@@ -20,7 +20,7 @@ class GameWorld
private static int level = 1;
private static int bossHealth = 6;
private static int fixedHealth = 6;
private static int playerDmg = 1;
private static int playerDmg = 100;
private static int gold = 0;
private static List<GameObject> toRemove = new List<GameObject>();
public static List<GameObject> toAdd = new List<GameObject>();
@@ -11,14 +11,12 @@ namespace CookieClicker
class Swordman : Unit
{

private int dps;
Thread damage = new Thread(new ParameterizedThreadStart(Dps));
public static Semaphore maxdmg = new Semaphore(0, 5);


public Swordman(string imagePath, Vector2D startPosition, int dps) : base(imagePath, startPosition)
{
this.dps = dps;
damage.Start(dps);

}
@@ -10,24 +10,23 @@ namespace CookieClicker
{
class Archer : Unit
{
private int cost;
private int dps;
static Mutex handleDamage = new Mutex();
Thread damage = new Thread(new ParameterizedThreadStart(Dps));

public Archer(string imagePath, Vector2D startPosition, int dps) : base(imagePath, startPosition)
{
this.dps = dps;
damage.Start(dps);

}

public static void Dps(object obj)
{
int dps = (int)obj;
while (true)
{

handleDamage.WaitOne();
GameWorld.BossHealth -= dps;
Thread.Sleep(500);
handleDamage.ReleaseMutex();
Thread.Sleep(1500);
}
}
public override void Draw(Graphics dc)
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Binary file not shown.
@@ -160,3 +160,4 @@ D:\semester 2 projekter\CookieClicker\CookieClicker\CookieClicker\obj\Debug\Cook
D:\semester 2 projekter\CookieClicker\CookieClicker\CookieClicker\obj\Debug\CookieClicker.Form1.resources
D:\semester 2 projekter\CookieClicker\CookieClicker\CookieClicker\obj\Debug\CookieClicker.Properties.Resources.resources
D:\semester 2 projekter\CookieClicker\CookieClicker\CookieClicker\obj\Debug\CookieClicker.csproj.GenerateResource.Cache
D:\Dania Games\Dania - Projekter\CookieClicker\CookieClicker\CookieClicker\obj\Debug\CookieClicker.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.