aboutsummaryrefslogtreecommitdiff
path: root/td/Assets/Scripts/Projectile.cs
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2017-10-17 22:05:53 +0200
committerJakob Stendahl <jakob.stendahl@outlook.com>2017-10-17 22:05:53 +0200
commit893160bc3047aa14321943fa52fcd20330d804db (patch)
treec45502accbbfb75035f7da92dc7c787b462189af /td/Assets/Scripts/Projectile.cs
parent0aff61a37fa8502521e760a78d8e51b614503773 (diff)
downloadTD-893160bc3047aa14321943fa52fcd20330d804db.tar.gz
TD-893160bc3047aa14321943fa52fcd20330d804db.zip
Added paycheck-system, player gets payed after wave is finished
Diffstat (limited to 'td/Assets/Scripts/Projectile.cs')
-rw-r--r--td/Assets/Scripts/Projectile.cs1
1 files changed, 1 insertions, 0 deletions
diff --git a/td/Assets/Scripts/Projectile.cs b/td/Assets/Scripts/Projectile.cs
index 3b02763..e8c427c 100644
--- a/td/Assets/Scripts/Projectile.cs
+++ b/td/Assets/Scripts/Projectile.cs
@@ -36,6 +36,7 @@ public class Projectile : MonoBehaviour {
void HitTarget() {
WaveSpawner.EnemiesAlive--;
Player.ScoreAdd (PointsPerHit);
+ Player.PaycheckAdd(_target.GetComponent<Enemy>().HeadPrice);
Destroy (_target.gameObject);
Destroy (gameObject);
}