JakeCataford / unity-tinkerbox

A Collection of game-independent unity scripts.
5 stars 1 forks source link

Projectile Class #9

Open JakeCataford opened 10 years ago

JakeCataford commented 10 years ago

Shoot bullets.

Class that is a base class for all projectiles. Like:

Methods:

Fire(); //On instantiation... Alive(); //On its way to the target... HitAgent(Agent agent); //Hit something I could kill... HitWall(); //Hit something i cant...

Props:

Vector2 Direction //Where am I going... float acceleration //is it a rocket or a grenade launcher? does it speed up or slow down? float speed // Speed of projectile