载入中...
搜索中...
未找到

武器模块(eve.Weapon)。 更多...

#include <Weapon.h>

类 eve::weapon::Weapon 继承关系图:
eve::Module

Public 成员函数

 Module_REG (Weapon)
 
 Weapon ()
 Weapon.
 
 ~Weapon () override
 Weapon.
 
int registerWeaponsFromJson (const std::string &json)
 从 JSON 注册武器模板;返回成功注册数量。
 
void clearWeaponDefinitions ()
 清空全部武器模板。
 
int getWeaponDefinitionCount ()
 已注册武器模板数量。
 
bool hasWeaponDefinition (const std::string &id)
 武器模板查询。
 
std::string getWeaponDefinitionLogic (const std::string &id)
 Returns the weapon definition logic.
 
float getWeaponDefinitionDamage (const std::string &id)
 Returns the weapon definition damage.
 
float getWeaponDefinitionRange (const std::string &id)
 Returns the weapon definition range.
 
eve::definitions::DefinitionRegistry & definitionRegistry () noexcept
 Return the common registry backing legacy weapon definitions.
 
WeaponEntity * newWeapon (const std::string &defId)
 工厂:对象由 ECS 表持有,脚本持有的是非拥有句柄。
 
WeaponMountEntity * newMount (const std::string &id, const std::string &type="turret")
 创建一个挂点(炮塔/机枪座等)。
 
WeaponRigEntity * newRig (const std::string &id, const std::string &wield="right_hand")
 创建一个手持位(ARPG/RPG 角色手持武器)。
 
bool rigAttachWeapon (WeaponRigEntity *rig, WeaponEntity *w)
 手持位操作:挂武器 / 取武器 / 设置持有位姿。
 
WeaponEntity * rigGetWeapon (WeaponRigEntity *rig)
 Rig get weapon.
 
void rigSetPose (WeaponRigEntity *rig, float px, float py, float pz, float rx, float ry, float rz)
 Rig set pose.
 
AmmoPoolEntity * newAmmoPool (const std::string &id, const std::string &ammoType, int max=-1)
 共享弹药池操作:创建 / 补弹 / 查询 / 绑定武器 / 解绑 / 取绑定池。
 
void ammoPoolAdd (AmmoPoolEntity *pool, int n)
 Ammo pool add.
 
int ammoPoolGetCount (AmmoPoolEntity *pool)
 Ammo pool get count.
 
bool bindAmmoPool (WeaponEntity *w, AmmoPoolEntity *pool)
 Binds ammo pool.
 
void unbindAmmoPool (WeaponEntity *w)
 Unbinds ammo pool.
 
AmmoPoolEntity * getAmmoPool (WeaponEntity *w)
 Returns the weapon's shared ammunition pool, or null when unbound.
 
bool mountAttachWeapon (WeaponMountEntity *m, WeaponEntity *w)
 挂点操作:挂武器 / 取武器 / 限位 / 瞄准 / 击毁。
 
WeaponEntity * mountGetWeapon (WeaponMountEntity *m)
 Returns the weapon mounted on a mount, or null when empty.
 
void mountSetLimits (WeaponMountEntity *m, float yawMin, float yawMax, float pitchMin, float pitchMax, float rotSpeed, float firingArc)
 Mounts set limits.
 
void mountAimAt (WeaponMountEntity *m, float yaw, float pitch)
 按限位夹取目标角并写入挂载武器的瞄准目标(角度,度)。
 
void mountDestroy (WeaponMountEntity *m)
 标记挂点被击毁(炮塔被打掉);已毁挂点不再瞄准/开火。
 
bool fire (WeaponEntity *w, const FireRequest &req)
 武器操作(脚本便捷入口,转发 WeaponSystem)。
 
bool fireAt (WeaponEntity *w, float x, float y, float z, int shooterId=0)
 向目标点开火(自动生成 FireRequest)。
 
bool attack (WeaponEntity *w, float yaw, float pitch, int shooterId=0)
 触发展开攻击(近战/法杖/导弹走阶段机;热武器等价 fire)。
 
bool canFire (WeaponEntity *w)
 Can fire.
 
void startReload (WeaponEntity *w)
 Starts reload.
 
void cancelReload (WeaponEntity *w)
 Cancel reload.
 
void setAim (WeaponEntity *w, float yaw, float pitch)
 Sets the aim.
 
bool setFireMode (WeaponEntity *w, const std::string &mode)
 运行时射击模式切换(safe/semi/auto)。
 
std::string getFireMode (WeaponEntity *w)
 当前射击模式名("single"|"burst"|"auto")。
 
int getSelectableModeCount (WeaponEntity *w)
 可选射击模式数量 / 第 index 个模式名。
 
std::string getSelectableMode (WeaponEntity *w, int index)
 Returns the selectable mode.
 
bool setAiming (WeaponEntity *w, bool aiming)
 开镜(ADS):切换 aiming 状态并推 aim_in/aim_out 事件。
 
bool isAiming (WeaponEntity *w)
 True when aiming.
 
float getZoomFov (WeaponEntity *w)
 开镜缩放 FOV(模板 zoomFov)。
 
float getSpread (WeaponEntity *w)
 手感查询:当前散布 / 未回正后坐。
 
float getRecoilPitch (WeaponEntity *w)
 Returns the recoil pitch.
 
float getRecoilYaw (WeaponEntity *w)
 Returns the recoil yaw.
 
void update (float dt)
 每帧推进全部武器与挂点。
 
void clearEvents ()
 事件队列(fire/reload/empty,上一次 update 产生)。
 
int getEventCount () const
 Returns the event count.
 
std::string getEventType (int index) const
 Returns the event type.
 
std::string getEventWeaponId (int index) const
 Returns the event weapon id.
 
std::string getEventDefId (int index) const
 Returns the event def id.
 
std::string getEventMountId (int index) const
 Returns the event mount id.
 
int getEventAmmoLeft (int index) const
 Returns the event ammo left.
 
float getEventArc (int index) const
 近战命中弧(仅 fire 事件)。
 
float getEventAoe (int index) const
 法术/导弹爆炸半径(仅 fire 事件)。
 
float getEventSpread (int index) const
 P0 手感/伤害事件载荷(仅 fire 事件)。
 
int getEventPellets (int index) const
 Returns the event pellets.
 
float getEventRecoilPitch (int index) const
 Returns the event recoil pitch.
 
float getEventRecoilYaw (int index) const
 Returns the event recoil yaw.
 
std::string getEventDamageType (int index) const
 Returns the event damage type.
 
std::string getEventElement (int index) const
 Returns the event element.
 
std::string getStage (WeaponEntity *w) const
 武器当前阶段("idle"|"windup"|"active"|"recover")。
 
float getResourceValue (WeaponEntity *w) const
 武器当前资源值(弹药/法力/充能/体力)。
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

静态 Public 成员函数

static void registerLogic (IWeaponLogic *logic)
 注册武器逻辑(C++ 插件/游戏侧扩展点;同名替换)。
 
static int getLogicCount ()
 已注册逻辑数量(内置 hitscan / projectile 起步)。
 

详细描述

武器模块(eve.Weapon)。

在文件 Weapon.h 第 24 行定义.

构造及析构函数说明

◆ Weapon()

eve::weapon::Weapon::Weapon ( )

Weapon.

在文件 Weapon.cpp 第 166 行定义.

引用了 eve::weapon::WeaponSystem::setEventSink().

◆ ~Weapon()

eve::weapon::Weapon::~Weapon ( )
override

Weapon.

在文件 Weapon.cpp 第 170 行定义.

引用了 eve::weapon::WeaponSystem::setEventSink().

成员函数说明

◆ ammoPoolAdd()

void eve::weapon::Weapon::ammoPoolAdd ( AmmoPoolEntity *  pool,
int  n 
)

Ammo pool add.

在文件 Weapon.cpp 第 378 行定义.

引用了 n.

◆ ammoPoolGetCount()

int eve::weapon::Weapon::ammoPoolGetCount ( AmmoPoolEntity *  pool)

Ammo pool get count.

在文件 Weapon.cpp 第 387 行定义.

◆ attack()

bool eve::weapon::Weapon::attack ( WeaponEntity *  w,
float  yaw,
float  pitch,
int  shooterId = 0 
)

◆ bindAmmoPool()

bool eve::weapon::Weapon::bindAmmoPool ( WeaponEntity *  w,
AmmoPoolEntity *  pool 
)

Binds ammo pool.

在文件 Weapon.cpp 第 389 行定义.

引用了 w.

◆ cancelReload()

void eve::weapon::Weapon::cancelReload ( WeaponEntity *  w)

Cancel reload.

在文件 Weapon.cpp 第 480 行定义.

引用了 eve::weapon::WeaponSystem::cancelReload() , 以及 w.

◆ canFire()

bool eve::weapon::Weapon::canFire ( WeaponEntity *  w)

Can fire.

在文件 Weapon.cpp 第 474 行定义.

引用了 eve::weapon::WeaponSystem::canFire() , 以及 w.

◆ clearEvents()

void eve::weapon::Weapon::clearEvents ( )

事件队列(fire/reload/empty,上一次 update 产生)。

在文件 Weapon.cpp 第 562 行定义.

◆ clearWeaponDefinitions()

void eve::weapon::Weapon::clearWeaponDefinitions ( )

◆ definitionRegistry()

eve::definitions::DefinitionRegistry & eve::weapon::Weapon::definitionRegistry ( )
inlinenoexcept

Return the common registry backing legacy weapon definitions.

返回
A borrowed owner-thread-affine registry used by WeaponDefinitionRuntime. The module owns it. @ownership Borrowed; this module retains ownership. @lifetime Valid until this Weapon module is destroyed.

在文件 Weapon.h 第 54 行定义.

被这些函数引用 eve::weapon::WeaponDefinitionRuntime::create().

◆ fire()

bool eve::weapon::Weapon::fire ( WeaponEntity *  w,
const FireRequest &  req 
)

武器操作(脚本便捷入口,转发 WeaponSystem)。

在文件 Weapon.cpp 第 448 行定义.

引用了 eve::weapon::WeaponSystem::tryFire() , 以及 w.

◆ fireAt()

bool eve::weapon::Weapon::fireAt ( WeaponEntity *  w,
float  x,
float  y,
float  z,
int  shooterId = 0 
)

◆ getAmmoPool()

AmmoPoolEntity * eve::weapon::Weapon::getAmmoPool ( WeaponEntity *  w)

Returns the weapon's shared ammunition pool, or null when unbound.

返回
Borrowed nullable ECS-owned pool. @ownership The ECS world owns the pool; this query transfers no ownership. @lifetime Valid until pool/world destruction or unbinding; use its generation handle across frames. @thread Call on the owning ECS thread. @reentrancy The query invokes no callbacks and is invalid across ECS mutation.

在文件 Weapon.cpp 第 399 行定义.

引用了 w.

◆ getEventAmmoLeft()

int eve::weapon::Weapon::getEventAmmoLeft ( int  index) const

Returns the event ammo left.

在文件 Weapon.cpp 第 582 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventAoe()

float eve::weapon::Weapon::getEventAoe ( int  index) const

法术/导弹爆炸半径(仅 fire 事件)。

在文件 Weapon.cpp 第 590 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventArc()

float eve::weapon::Weapon::getEventArc ( int  index) const

近战命中弧(仅 fire 事件)。

在文件 Weapon.cpp 第 586 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventCount()

int eve::weapon::Weapon::getEventCount ( ) const

◆ getEventDamageType()

std::string eve::weapon::Weapon::getEventDamageType ( int  index) const

Returns the event damage type.

在文件 Weapon.cpp 第 610 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventDefId()

std::string eve::weapon::Weapon::getEventDefId ( int  index) const

Returns the event def id.

在文件 Weapon.cpp 第 574 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventElement()

std::string eve::weapon::Weapon::getEventElement ( int  index) const

Returns the event element.

在文件 Weapon.cpp 第 614 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventMountId()

std::string eve::weapon::Weapon::getEventMountId ( int  index) const

Returns the event mount id.

在文件 Weapon.cpp 第 578 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventPellets()

int eve::weapon::Weapon::getEventPellets ( int  index) const

Returns the event pellets.

在文件 Weapon.cpp 第 598 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventRecoilPitch()

float eve::weapon::Weapon::getEventRecoilPitch ( int  index) const

Returns the event recoil pitch.

在文件 Weapon.cpp 第 602 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventRecoilYaw()

float eve::weapon::Weapon::getEventRecoilYaw ( int  index) const

Returns the event recoil yaw.

在文件 Weapon.cpp 第 606 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventSpread()

float eve::weapon::Weapon::getEventSpread ( int  index) const

P0 手感/伤害事件载荷(仅 fire 事件)。

在文件 Weapon.cpp 第 594 行定义.

引用了 getEventCount() , 以及 index.

◆ getEventType()

std::string eve::weapon::Weapon::getEventType ( int  index) const

Returns the event type.

在文件 Weapon.cpp 第 566 行定义.

引用了 getEventCount(), index, type , 以及 eve::weapon::weaponEventTypeName().

◆ getEventWeaponId()

std::string eve::weapon::Weapon::getEventWeaponId ( int  index) const

Returns the event weapon id.

在文件 Weapon.cpp 第 570 行定义.

引用了 getEventCount() , 以及 index.

◆ getFireMode()

std::string eve::weapon::Weapon::getFireMode ( WeaponEntity *  w)

当前射击模式名("single"|"burst"|"auto")。

在文件 Weapon.cpp 第 505 行定义.

引用了 eve::weapon::fireModeName() , 以及 w.

◆ getLogicCount()

int eve::weapon::Weapon::getLogicCount ( )
static

已注册逻辑数量(内置 hitscan / projectile 起步)。

在文件 Weapon.cpp 第 275 行定义.

引用了 eve::weapon::WeaponSystem::logicCount().

◆ getRecoilPitch()

float eve::weapon::Weapon::getRecoilPitch ( WeaponEntity *  w)

Returns the recoil pitch.

在文件 Weapon.cpp 第 540 行定义.

引用了 w.

◆ getRecoilYaw()

float eve::weapon::Weapon::getRecoilYaw ( WeaponEntity *  w)

Returns the recoil yaw.

在文件 Weapon.cpp 第 542 行定义.

引用了 w.

◆ getResourceValue()

float eve::weapon::Weapon::getResourceValue ( WeaponEntity *  w) const

武器当前资源值(弹药/法力/充能/体力)。

在文件 Weapon.cpp 第 622 行定义.

引用了 w.

◆ getSelectableMode()

std::string eve::weapon::Weapon::getSelectableMode ( WeaponEntity *  w,
int  index 
)

Returns the selectable mode.

在文件 Weapon.cpp 第 514 行定义.

引用了 d, eve::weapon::fireModeName(), index , 以及 w.

◆ getSelectableModeCount()

int eve::weapon::Weapon::getSelectableModeCount ( WeaponEntity *  w)

可选射击模式数量 / 第 index 个模式名。

在文件 Weapon.cpp 第 509 行定义.

引用了 d , 以及 w.

◆ getSpread()

float eve::weapon::Weapon::getSpread ( WeaponEntity *  w)

手感查询:当前散布 / 未回正后坐。

在文件 Weapon.cpp 第 538 行定义.

引用了 w.

◆ getStage()

std::string eve::weapon::Weapon::getStage ( WeaponEntity *  w) const

武器当前阶段("idle"|"windup"|"active"|"recover")。

在文件 Weapon.cpp 第 618 行定义.

引用了 eve::weapon::attackStageName() , 以及 w.

◆ getWeaponDefinitionCount()

int eve::weapon::Weapon::getWeaponDefinitionCount ( )

已注册武器模板数量。

在文件 Weapon.cpp 第 242 行定义.

引用了 eve::definitions::DefinitionRegistry::countType().

◆ getWeaponDefinitionDamage()

float eve::weapon::Weapon::getWeaponDefinitionDamage ( const std::string &  id)

Returns the weapon definition damage.

在文件 Weapon.cpp 第 255 行定义.

◆ getWeaponDefinitionLogic()

std::string eve::weapon::Weapon::getWeaponDefinitionLogic ( const std::string &  id)

Returns the weapon definition logic.

在文件 Weapon.cpp 第 246 行定义.

◆ getWeaponDefinitionRange()

float eve::weapon::Weapon::getWeaponDefinitionRange ( const std::string &  id)

Returns the weapon definition range.

在文件 Weapon.cpp 第 264 行定义.

◆ getZoomFov()

float eve::weapon::Weapon::getZoomFov ( WeaponEntity *  w)

开镜缩放 FOV(模板 zoomFov)。

在文件 Weapon.cpp 第 533 行定义.

引用了 d, w , 以及 eve::weapon::WeaponDefinition::zoomFov.

◆ hasWeaponDefinition()

bool eve::weapon::Weapon::hasWeaponDefinition ( const std::string &  id)

武器模板查询。

在文件 Weapon.cpp 第 244 行定义.

引用了 eve::definitions::DefinitionRegistry::resolve().

◆ isAiming()

bool eve::weapon::Weapon::isAiming ( WeaponEntity *  w)

True when aiming.

在文件 Weapon.cpp 第 531 行定义.

引用了 w.

◆ Module_REG()

eve::weapon::Weapon::Module_REG ( Weapon  )

◆ mountAimAt()

void eve::weapon::Weapon::mountAimAt ( WeaponMountEntity *  m,
float  yaw,
float  pitch 
)

按限位夹取目标角并写入挂载武器的瞄准目标(角度,度)。

在文件 Weapon.cpp 第 424 行定义.

引用了 m, pitch, w , 以及 yaw.

◆ mountAttachWeapon()

bool eve::weapon::Weapon::mountAttachWeapon ( WeaponMountEntity *  m,
WeaponEntity *  w 
)

挂点操作:挂武器 / 取武器 / 限位 / 瞄准 / 击毁。

在文件 Weapon.cpp 第 405 行定义.

引用了 m , 以及 w.

◆ mountDestroy()

void eve::weapon::Weapon::mountDestroy ( WeaponMountEntity *  m)

标记挂点被击毁(炮塔被打掉);已毁挂点不再瞄准/开火。

在文件 Weapon.cpp 第 439 行定义.

引用了 m.

◆ mountGetWeapon()

WeaponEntity * eve::weapon::Weapon::mountGetWeapon ( WeaponMountEntity *  m)

Returns the weapon mounted on a mount, or null when empty.

返回
Borrowed nullable ECS-owned weapon. @ownership The ECS world owns the weapon; this query transfers no ownership. @lifetime Valid until weapon/world destruction or unmounting; use its generation handle across frames. @thread Call on the owning ECS thread. @reentrancy The query invokes no callbacks and is invalid across ECS mutation.

在文件 Weapon.cpp 第 411 行定义.

引用了 m.

◆ mountSetLimits()

void eve::weapon::Weapon::mountSetLimits ( WeaponMountEntity *  m,
float  yawMin,
float  yawMax,
float  pitchMin,
float  pitchMax,
float  rotSpeed,
float  firingArc 
)

Mounts set limits.

在文件 Weapon.cpp 第 413 行定义.

引用了 m.

◆ newAmmoPool()

AmmoPoolEntity * eve::weapon::Weapon::newAmmoPool ( const std::string &  id,
const std::string &  ammoType,
int  max = -1 
)

共享弹药池操作:创建 / 补弹 / 查询 / 绑定武器 / 解绑 / 取绑定池。

Creates an ECS-owned shared ammunition pool.

返回
Borrowed nullable ECS-owned pool; null means creation failed. @ownership The ECS world owns the pool; callers must not delete it. @lifetime Valid until pool/world destruction; retain its generation handle across frames. @thread Call on the owning ECS thread. @reentrancy Creation invokes no external callbacks; do not re-enter structural ECS mutation.

在文件 Weapon.cpp 第 369 行定义.

引用了 eve::weapon::AmmoPoolEntity::createPool(), id, max , 以及 p.

◆ newMount()

WeaponMountEntity * eve::weapon::Weapon::newMount ( const std::string &  id,
const std::string &  type = "turret" 
)

创建一个挂点(炮塔/机枪座等)。

返回
Borrowed nullable ECS-owned mount; null means creation failed. @ownership The ECS world owns the entity; callers must not delete it. @lifetime Valid until entity/world destruction; retain its generation handle across frames. @thread Call on the owning ECS thread. @reentrancy Creation invokes no external callbacks; do not re-enter structural ECS mutation.

在文件 Weapon.cpp 第 327 行定义.

引用了 eve::weapon::WeaponMountEntity::createMount(), id, m , 以及 type.

◆ newRig()

WeaponRigEntity * eve::weapon::Weapon::newRig ( const std::string &  id,
const std::string &  wield = "right_hand" 
)

创建一个手持位(ARPG/RPG 角色手持武器)。

返回
Borrowed nullable ECS-owned rig; null means creation failed. @ownership The ECS world owns the entity; callers must not delete it. @lifetime Valid until entity/world destruction; retain its generation handle across frames. @thread Call on the owning ECS thread. @reentrancy Creation invokes no external callbacks; do not re-enter structural ECS mutation.

在文件 Weapon.cpp 第 335 行定义.

引用了 eve::weapon::WeaponRigEntity::createRig(), id , 以及 r.

◆ newWeapon()

WeaponEntity * eve::weapon::Weapon::newWeapon ( const std::string &  defId)

工厂:对象由 ECS 表持有,脚本持有的是非拥有句柄。

返回
Borrowed nullable ECS-owned weapon; null means validation or creation failed. @ownership The ECS world owns the entity; callers must not delete it. @lifetime Valid until entity/world destruction; retain its generation handle across frames. @thread Call on the owning ECS thread. @reentrancy Creation invokes no external callbacks; do not re-enter structural ECS mutation.

在文件 Weapon.cpp 第 287 行定义.

引用了 eve::weapon::Ammo, eve::weapon::AttackResource::cost, eve::weapon::WeaponEntity::createWeapon(), d, eve::weapon::WeaponDefinition::fireMode, eve::weapon::AttackResource::infinite, eve::weapon::AttackResource::kind, eve::weapon::WeaponDefinition::kind, eve::weapon::Resource::kind, eve::weapon::WeaponDefinition::magSize, eve::weapon::AttackResource::max, r, eve::weapon::Ranged, eve::weapon::AttackResource::regen, eve::weapon::WeaponDefinition::reserveSize, eve::weapon::WeaponDefinition::resource, eve::weapon::WeaponDefinition::spreadMin , 以及 w.

◆ registerLogic()

void eve::weapon::Weapon::registerLogic ( IWeaponLogic *  logic)
static

注册武器逻辑(C++ 插件/游戏侧扩展点;同名替换)。

在文件 Weapon.cpp 第 273 行定义.

引用了 eve::weapon::WeaponSystem::registerLogic().

◆ registerWeaponsFromJson()

int eve::weapon::Weapon::registerWeaponsFromJson ( const std::string &  json)

◆ rigAttachWeapon()

bool eve::weapon::Weapon::rigAttachWeapon ( WeaponRigEntity *  rig,
WeaponEntity *  w 
)

手持位操作:挂武器 / 取武器 / 设置持有位姿。

在文件 Weapon.cpp 第 347 行定义.

引用了 w.

◆ rigGetWeapon()

WeaponEntity * eve::weapon::Weapon::rigGetWeapon ( WeaponRigEntity *  rig)

Rig get weapon.

在文件 Weapon.cpp 第 353 行定义.

◆ rigSetPose()

void eve::weapon::Weapon::rigSetPose ( WeaponRigEntity *  rig,
float  px,
float  py,
float  pz,
float  rx,
float  ry,
float  rz 
)

Rig set pose.

在文件 Weapon.cpp 第 355 行定义.

引用了 px, py , 以及 pz.

◆ setAim()

void eve::weapon::Weapon::setAim ( WeaponEntity *  w,
float  yaw,
float  pitch 
)

Sets the aim.

在文件 Weapon.cpp 第 484 行定义.

引用了 pitch, w , 以及 yaw.

◆ setAiming()

bool eve::weapon::Weapon::setAiming ( WeaponEntity *  w,
bool  aiming 
)

开镜(ADS):切换 aiming 状态并推 aim_in/aim_out 事件。

在文件 Weapon.cpp 第 520 行定义.

引用了 eve::weapon::AimIn, eve::weapon::AimOut, d, eve::weapon::WeaponEvent::defId, eve::weapon::WeaponSystem::emitEvent(), eve::weapon::WeaponEvent::type, w , 以及 eve::weapon::WeaponEvent::weaponId.

◆ setFireMode()

bool eve::weapon::Weapon::setFireMode ( WeaponEntity *  w,
const std::string &  mode 
)

运行时射击模式切换(safe/semi/auto)。

在文件 Weapon.cpp 第 490 行定义.

引用了 d, eve::weapon::fireModeFromName(), m , 以及 w.

◆ startReload()

void eve::weapon::Weapon::startReload ( WeaponEntity *  w)

Starts reload.

在文件 Weapon.cpp 第 476 行定义.

引用了 eve::weapon::WeaponSystem::startReload() , 以及 w.

◆ unbindAmmoPool()

void eve::weapon::Weapon::unbindAmmoPool ( WeaponEntity *  w)

Unbinds ammo pool.

在文件 Weapon.cpp 第 395 行定义.

引用了 w.

◆ update()

void eve::weapon::Weapon::update ( float  dt)

每帧推进全部武器与挂点。

在文件 Weapon.cpp 第 544 行定义.

引用了 h, m, eve::weapon::WeaponSystem::update() , 以及 w.


该类的文档由以下文件生成: