private void Start() { ThirdWeaponState = ThirdGameObject.GetComponent <vChangeWeapon>(); TopWeaponState = TopGameObject.GetComponent <vChangeWeapon>(); ThirdAmmoScript = TopGameObject.GetComponent <Invector.vItemManager.vAmmoManager>(); TopAmmoScript = TopGameObject.GetComponent <Invector.vItemManager.vAmmoManager>(); }
public override IEnumerator OnDoActionDelay(GameObject cc) { yield return(StartCoroutine(base.OnDoActionDelay(cc))); ammoManager = cc.gameObject.GetComponent <vAmmoManager>(); if (ammoManager != null) { ammoManager.AddAmmo(weaponName, ammoID, ammoAmount); } }