Class EntityGunItem
- Namespace
- VoxelPlayground.Entity
- Assembly
- GamePlay.dll
public class EntityGunItem : EntityHoldWeapon
- Inheritance
-
objectEntityGunItem
- Derived
- Inherited Members
- Extension Methods
Fields
bulletInitSpeed
public float bulletInitSpeed
Field Value
- float
bulletMass
public float bulletMass
Field Value
- float
bulletName
public string bulletName
Field Value
- string
bulletTrailName
public string bulletTrailName
Field Value
- string
casingPoint
public Transform casingPoint
Field Value
fireEffectName
public string fireEffectName
Field Value
- string
hasShotFlash
public bool hasShotFlash
Field Value
- bool
needCasing
public bool needCasing
Field Value
- bool
numBulletsPerFire
public int numBulletsPerFire
Field Value
- int
projectilePrefab
public Entity projectilePrefab
Field Value
recoilForce
public float recoilForce
Field Value
- float
shootSoundEffect
public string shootSoundEffect
Field Value
- string
shotBias
public float shotBias
Field Value
- float
shotBulletOffsetForward
public float shotBulletOffsetForward
Field Value
- float
upAsForward
[InfoBox("Prefab是否正方向向上", InfoMessageType.Info, null)]
public bool upAsForward
Field Value
- bool
Methods
Activate()
public override void Activate()
Awake()
protected override void Awake()
Casing()
public virtual void Casing()
FireAuxiliary()
protected void FireAuxiliary()
FireOnce()
[Button]
public override void FireOnce()
ForceFire()
public void ForceFire()
GetSpreadShotDir(Vector3)
protected Vector3 GetSpreadShotDir(Vector3 shotDir)
Parameters
shotDirVector3
Returns
OnShotProjectile(Entity)
protected virtual void OnShotProjectile(Entity projectile)
Parameters
projectileEntity
ResetFirePointDirection()
public void ResetFirePointDirection()
UpdateFirePointDirection(Vector3, float)
public void UpdateFirePointDirection(Vector3 targetDir, float lerpFactor = 1)
Parameters
targetDirVector3lerpFactorfloat