Alexdejonge / open-tower-defense

Automatically exported from code.google.com/p/open-tower-defense
0 stars 0 forks source link

add projectiles #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
add projectile class that towers can create instances of

needs to have origin, destination, enemy index, speed, damage, and damage type

projectile manager class iterates through projectiles each round and moves
them closer to destination.  on impact with indexed enemy, deduct damage
from enemy.health and apply any necessary damage type conditions (i.e.
frost = slow speed)

Original issue reported on code.google.com by badd...@gmail.com on 28 Feb 2008 at 9:07

GoogleCodeExporter commented 9 years ago
What's enemy index?

Original comment by ralaba...@gmail.com on 28 Feb 2008 at 9:32

GoogleCodeExporter commented 9 years ago
i use a manager class for tracking all the enemies, making sure they move and
whatnot.  the index is an integer the enemy class keeps track of so it knows 
where it
lives in the ArrayList.  i did that for projectiles to track enemy's with just 
an
index to reference, rather than passing on an instance of the enemy class

Original comment by badd...@gmail.com on 28 Feb 2008 at 9:57

GoogleCodeExporter commented 9 years ago
I'm currently also working on a TD game in Csharp, wouldn't mind collobarating!

Original comment by patricks...@gmail.com on 25 Jun 2008 at 3:42