Table of Contents

Class Weapon

public class Weapon : MonoBehaviour
Inheritance
Weapon

Fields

OnProjectileLaunched

public UnityEvent<Transform> OnProjectileLaunched

Field Value

UnityEvent<Transform>

OnRaycastHit

public UnityEvent<RaycastHit> OnRaycastHit

Field Value

UnityEvent<RaycastHit>

OnReload

public UnityEvent OnReload

Field Value

UnityEvent

OnReloadProgress

public UnityEvent<float> OnReloadProgress

Field Value

UnityEvent<float>

OnShoot

public UnityEvent OnShoot

Field Value

UnityEvent

Properties

CurrentAmmo

public int CurrentAmmo { get; }

Property Value

int

FireMode

public FireMode FireMode { get; }

Property Value

FireMode

Methods

AddAmmo(int)

public void AddAmmo(int amount)

Parameters

amount int

CanFire()

public bool CanFire()

Returns

bool

Fire()

public void Fire()

Reload()

public void Reload()

ReturnProjectile(GameObject)

Return a projectile instance back to the pool.

public void ReturnProjectile(GameObject go)

Parameters

go GameObject

SetTrajectoryEnabled(bool)

public void SetTrajectoryEnabled(bool enabled)

Parameters

enabled bool

StartAutoFire()

public void StartAutoFire()

StopAutoFire()

public void StopAutoFire()