// Start is called before the first frame update void Start() { sr = GetComponent <SpriteRenderer>(); player = GameObject.FindGameObjectWithTag("Player"); playerCamera = GameObject.Find("PlayerCamera"); GetAmmoType(); ammoStockpile = player.GetComponent <AmmoStockpile>(); anim = GetComponent <Animator>(); sr.sprite = m_scriptableWeapon.weaponSprite; weaponSprite = m_scriptableWeapon.weaponSprite; audioSource = player.GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { weaponDatabase = GameObject.FindGameObjectWithTag("WeaponDatabase").GetComponent <Inventory>(); ammoStockpile = GetComponent <AmmoStockpile>(); selectedSlot = 0; }