#include <item.h>
Inheritance diagram for TKWeapon:
Public Methods | |
TKWeapon () | |
TKWeapon (const TKWeapon &OldKWeapon) | |
virtual | ~TKWeapon () |
virtual bool | load (TDataPackageList *in) |
virtual bool | save (TDataPackageList *out) const |
virtual TItem::tItemType | getItemType () const |
virtual void | setVelocity (const int4 Velocity) |
virtual int4 | getVelocity () const |
virtual void | setAmmunitionSize (const int2 AmmunitionSize) |
virtual int2 | getAmmunitionSize () const |
virtual bool | operator== (const TKWeapon &KWeapon) const |
virtual TKWeapon & | operator= (const TKWeapon &KWeapon) |
Protected Attributes | |
int4 | fVelocity |
int2 | fAmmunitionSize |
|
This constructor generates a new TKWeapon object with all properties resetted. This means you have to set all properties like name and mass afterwards with help of the respective set<something> methods. |
|
This constructor creates also a new kinetic energy weapon, but the attributes are copied from the kinetic energy weapon given in OldKWeapon. Mostly implemented to provide a copy constructor.
|
|
Destructs the object. Has nothing else to do, because no memory has to be freed or similar stuff. |
|
With the method getAmmunitionSize you can get the ammunition size of this kinetic weapon. This is important, if you want to know, how much ammunition you can store in a given cargo space.
|
|
The method getItemType returns the type of the item, in this case TItem::KWEAPON for kinetic weapon.
Reimplemented from TWeapon. |
|
With the method getVelocity you can get the velocity of the projectile of the kinetic weapon.
|
|
The method Load loads a TKWeapon object from the data packages in the list.
Reimplemented from TWeapon. |
|
This is the assignment operator for TKWeapon. |
|
With the method operator== you can compare two TKWeapon objects. This is of course the behaviour one would expect from "operator==".
|
|
The method Save saves a TKWeapon object by adding the data packages to the list.
Reimplemented from TWeapon. |
|
The method setAmmunitionSize sets the size of the ammunition of this kinetic weapon. This is important, if you want to know, how much ammunition you can store in a given cargo space.
|
|
The method setVelocity sets the velocity of the projectile of the kinetic weapon.
|
|
the ammunition size of the kinetic weapon |
|
the velocity of the projectile of the kinetic weapon |