= Projectile = [[ArchivePage]] A Baseclass for all the Projectiles/Bullets that one might imagne. A Projectile is most of the Time emitted by a [wiki:Weapon Weapon]. __Dependecies__ * [wiki:WorldEntity WorldEntity] * [wiki:Weapon Weapon] * !FastFactory '''Projectiles''' get emitted by [wiki:Weapon Weapon]. ''Weapons'' give them their impuls, their live, and mainly all the essential __initial values__. From there on, they are on their own, and fly through space searching for something to destroy and initiate the '''~''' operator ... * '''types''': 1. Rockets 1. Lasers 1. Projectiles (Metallic or Metalloplastic) 1. Bombs 1. Joining (like the linking-gun of some other games...) 1. other doomsdaydevice-equal destruction Methods 1. Zero Point Gravity/Black Hole == Implementation == Here follows a listing of the most important Functions of this Class: {{{ #!cpp void setFlightDirection(const Quaternion& flightDirection); void setVelocity(const Vector &velocity); void setLifeSpan(float lifeSpan); void setEnergies(float energyMin, float energyMax); /** @brief This is called, when the Projectile is Emitted */ virtual void activate() = 0; /** @brief This is called, when the Projectile is being destroyed, or deleted */ virtual void deactivate() = 0; virtual void destroy (); virtual void tick (float time); virtual void draw () const; }}} == Projectile Creation == Creating Projectiles is a rather easy process, but if you like, Projecties can be extremely extendable. For instance, if you liked some Gravitation gun (not the one from HL2), then you would connect a physical field to the Gun, that sucks in all NPC's and if they are to near, distroy them (or damage them about some amount). __Description__ 1. Have a look at the creation-howto of [wiki:WorldEntity WorldEntity] 2. Make the class '''public [wiki:Projectile Projectile]''' instead of ''public [wiki:WorldEntity WorldEntity]'' (include projectile.h instead of world_entity.h) 3. Graphics: probably the most important part about the creation of a Projectile -> OpenGL 4. Special Actions, etc