Assembly: Sandbox.Game.dll

public class MyGunBase: MyDeviceBase

Fields

Member Description
static AMMO_PER_SHOOT
static DUMMY_KEY_HOLDING
static DUMMY_KEY_MISSILE
static DUMMY_KEY_PROJECTILE
ActiveLoopEffects
m_holdingDummyMatrix

Events

Member Description
OnAmmoAmountChanged

Properties

Member Description
BackkickForcePerSecond
CurrentAmmo
CurrentAmmoDefinition
CurrentAmmoMagazineDefinition
CurrentAmmoMagazineId
CurrentMagazines
DeviateAngle
DeviateAngleWhileAiming
HasAmmoMagazines
HasDummies
HasIronSightsActive
HasMissileAmmoDefined
HasProjectileAmmoDefined
IsAmmoMissile
IsAmmoProjectile
IsUserControllableGunBlock
LastShootTime
MechanicalDamage
MuzzleFlashLifeSpan
NoAmmoSound
PreShotSound
ReleaseTimeAfterFire
ReloadSound
ReloadTime
SecondarySound
ShootIntervalInMiliseconds
ShootIntervalModifier
ShootSound
ShotsInBurst
SupportReloading
UseDefaultMuzzleFlash
User
WeaponDefinition
WeaponProperties
WorldMatrix
InventoryItemId Reference to the inventory item that this device originated from. Can be used to update the inventory item (when ammo changes etc...)

Inherited from MyDeviceBase

Constructors

Member Description
MyGunBase()

Methods

Member Description
static GetMissileInitialSpeed(Vector3, Vector3, float, float)
AddMuzzleMatrix(MyAmmoType, Matrix, string)
CanSwitchAmmoMagazine()
ConsumeAmmo()
ConsumeMagazine()
CreateAmmoInventoryConstraints(string)
CreateEffects(WeaponEffectAction, uint?, bool)
DummiesPerType(MyAmmoType)
EmptyMagazine()
GetAmmoMagazinesClient()
GetAmmunitionAmount()
GetCurrentDummyName()
GetDeviatedVector(float, Vector3)
GetInventoryAmmoMagazinesCount()
GetMagazineAmount()
GetMuzzleLocalMatrix()
GetMuzzleLocalPosition()
GetMuzzleWorldMatrix()
GetMuzzleWorldPosition()
GetObjectBuilder()
GetTotalAmmunitionAmount()
HasActiveEffects()
HasEnoughAmmunition()
HasEnoughMagazines()
Init(MyObjectBuilder_GunBase, MyCubeBlockDefinition, IMyGunBaseUser)
Init(MyObjectBuilder_GunBase, MyDefinitionId, IMyGunBaseUser)
InitAmmoFromObjectBuilder(MyObjectBuilder_GunBase, bool)
IsAmmoFull()
IsAmmoMagazineCompatible(MyDefinitionId)
LoadDummies(Dictionary<string, MyModelDummy>, Dictionary<int, string>)
MoveToNextMuzzle(MyAmmoType)
RefreshAmmunitionAmount(bool)
RemoveAllEffects()
RemoveOldEffects(WeaponEffectAction)
SetCurrentAmmo(int, bool)
Shoot(Vector3, MyEntity, MyLargeBarrelBase)
Shoot(Vector3, MyEntity, uint?)
Shoot(Vector3, Vector3D, MyEntity, uint?)
Shoot(Vector3D, Vector3, Vector3, MyEntity, uint?, bool)
ShootWithOffset(Vector3, Vector3, float, MyEntity, uint?, bool) This function changes default shooting position (muzzle flash) with an offset. (allow us to shoot at close objects)
StartPreShotSound(MyEntity3DSoundEmitter, bool)
StartShootSound(MyEntity3DSoundEmitter, bool)
StopShoot()
SwitchAmmoMagazine(MyDefinitionId)
SwitchAmmoMagazineToFirstAvailable()
SwitchAmmoMagazineToNextAvailable()
SwitchToNextAmmoMagazine()
TrySubscribeToEntityEvents(MyEntity)
UpdateEffectPositions()
UpdateEffects()
CanSwitchAmmoMagazine() Determines whether this device can switch ammo

Inherited from MyDeviceBase
GetMuzzleLocalPosition() Gets the muzzle local position

Inherited from MyDeviceBase
GetMuzzleWorldPosition() Gets the muzzle world position

Inherited from MyDeviceBase
Init(MyObjectBuilder_DeviceBase) Initialization of the device

Inherited from MyDeviceBase
SwitchAmmoMagazineToNextAvailable() Switches to the next available ammo magazine

Inherited from MyDeviceBase
SwitchToNextAmmoMagazine() Switches to the next ammo magazine

Inherited from MyDeviceBase

Inheritance: MyDeviceBase