Nuclide
Software Development Kit for id Tech
NSWeapon Class Reference

#include <NSWeapon.h>

Inheritance diagram for NSWeapon:
NSItem

Public Member Functions

void NSWeapon (void)
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ::SpawnKey but for save-game fields. More...
 
virtual void Draw (void)
 Overridable: Called when we switch to this weapon. More...
 
virtual void Holster (void)
 Overridable: Called when we are about to switch to another weapon. More...
 
virtual void PrimaryAttack (void)
 Overridable: On +attack execution. More...
 
virtual void SecondaryAttack (void)
 Overridable: On +attack2 execution. More...
 
virtual void Reload (void)
 Overridlable: On +reload execution. More...
 
virtual void Release (void)
 Overridable: When no buttons are held. More...
 

Constructor & Destructor Documentation

◆ NSWeapon()

void NSWeapon::NSWeapon ( void  )

Member Function Documentation

◆ Draw()

void NSWeapon::Draw ( void  )
virtual

Overridable: Called when we switch to this weapon.

◆ Holster()

void NSWeapon::Holster ( void  )
virtual

Overridable: Called when we are about to switch to another weapon.

◆ PrimaryAttack()

void NSWeapon::PrimaryAttack ( void  )
virtual

Overridable: On +attack execution.

◆ Release()

void NSWeapon::Release ( void  )
virtual

Overridable: When no buttons are held.

◆ Reload()

void NSWeapon::Reload ( void  )
virtual

Overridlable: On +reload execution.

◆ Restore()

void NSWeapon::Restore ( string  strKey,
string  strValue 
)
virtual

Similar to ::SpawnKey but for save-game fields.

Whatever you write into file handles within your ::Save() method needs to be read back in here.

Reimplemented from NSItem.

◆ Save()

void NSWeapon::Save ( float  handle)
virtual

Handles saving a copy of this entity to a given filehandle.

Within you want to use the ::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.

Reimplemented from NSItem.

◆ SecondaryAttack()

void NSWeapon::SecondaryAttack ( void  )
virtual

Overridable: On +attack2 execution.


The documentation for this class was generated from the following files: