public float timerCancelFireAfterReload = 0.5f; // Timer set. TODO : match with the sound's time of reloading void Awake() { playerAmmo = gameObject.GetComponent<PlayerAmmo>(); doubleGuns = gameObject.GetComponent<WeaponDoubleGuns>(); flamethrower = gameObject.GetComponent<WeaponFlamethrower>(); playerController = gameObject.GetComponent<PlayerController>(); }
public float timerCancelFireAfterReload = 0.5f; // Timer set. TODO : match with the sound's time of reloading void Awake() { playerAmmo = gameObject.GetComponent <PlayerAmmo>(); doubleGuns = gameObject.GetComponent <WeaponDoubleGuns>(); flamethrower = gameObject.GetComponent <WeaponFlamethrower>(); playerController = gameObject.GetComponent <PlayerController>(); }
// Use this for initialization void Start() { playerAmmo = gameObject.GetComponent<PlayerAmmo>(); doubleGuns = gameObject.GetComponent<WeaponDoubleGuns>(); flamethrower = gameObject.GetComponent<WeaponFlamethrower>(); if (rigWeaponAndArms != null && rigWeaponAndArms.Length > 1) { //Use the double gun at start indexActiveWeapon = 0; rigWeaponAndArms[0].SetActive(true); rigWeaponAndArms[1].SetActive(false); } }