protected virtual void Reload() { CancelAmmoEvents(); if (curAmmo) { ammos.Remove(curAmmo); } //is ammo all gone? if (curAmmoInd > ammos.Count - 1) { curAmmoInd = -1; Debug.Log(this + " is depleted! Need more ammo."); OnAmmoDepleted(); OnClipIndexChanged(); OnClipAmountChanged(); } else { //if not reload OnClipAmountChanged(); OnReloadEnter(); reloadingCoroutine = reloadingCoroutine.ReplayCoroutine(StartReload()); } }
public void Use() { if (Data.fireType == ItemWeaponRangedData.FireType.Single) { UseWeapon(); } else { fireCoroutine = fireCoroutine.ReplayCoroutine(StartFire()); } }
public virtual void Use() { inUseCoroutine = inUseCoroutine.ReplayCoroutine(StartUse()); }