Emergency 20 Dokumentation  4.2.0
WeaponConfiguration.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
15 
16 #include <qsf/time/Time.h>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24  namespace weapon
25  {
26 
27 
28  //[-------------------------------------------------------]
29  //[ Public definitions ]
30  //[-------------------------------------------------------]
32  {
36  float mShootRange;
37  uint32 mMaxNumberShots; // 0 for unlimited
40 
41  // Constructor uses the default values for the pistol weapon
42  inline explicit WeaponConfiguration(Weapon weaponType = PISTOL) :
43  mWeaponType(weaponType),
44  mDamageHealth(0.45f),
45  mDamageVehicle(0.25f),
46  mShootRange(10.0f),
47  mMaxNumberShots(0),
48  mTimeToAim(qsf::Time::fromSeconds(0.5f)),
49  mTimeToWaitAfterShot(qsf::Time::fromSeconds(1.0f))
50  {}
51  };
52 
53 
54 
55 //[-------------------------------------------------------]
56 //[ Namespace ]
57 //[-------------------------------------------------------]
58  } // weapon
59 } // em5
Definition: ActionPriority.h:13
Weapon mWeaponType
Definition: WeaponConfiguration.h:33
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: WeaponConfiguration.h:31
qsf::Time mTimeToAim
Definition: WeaponConfiguration.h:38
Definition: PickupPersonByParamedicAction.h:21
float mDamageHealth
Definition: WeaponConfiguration.h:34
float mShootRange
Definition: WeaponConfiguration.h:36
Weapon
Definition: Weapon.h:22
WeaponConfiguration(Weapon weaponType=PISTOL)
Definition: WeaponConfiguration.h:42
float mDamageVehicle
Definition: WeaponConfiguration.h:35
Definition: Weapon.h:28
qsf::Time mTimeToWaitAfterShot
Definition: WeaponConfiguration.h:39
uint32 mMaxNumberShots
Definition: WeaponConfiguration.h:37
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32