Table of Contents

Class EntityGunItem

Namespace
VoxelPlayground.Entity
Assembly
GamePlay.dll
public class EntityGunItem : EntityHoldWeapon
Inheritance
object
EntityGunItem
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

Transform

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

Entity

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

shotDir Vector3

Returns

Vector3

OnShotProjectile(Entity)

protected virtual void OnShotProjectile(Entity projectile)

Parameters

projectile Entity

ResetFirePointDirection()

public void ResetFirePointDirection()

UpdateFirePointDirection(Vector3, float)

public void UpdateFirePointDirection(Vector3 targetDir, float lerpFactor = 1)

Parameters

targetDir Vector3
lerpFactor float