public override void ApplyLoot(GameObject player) { base.ApplyLoot(player); DropBank.Instance().Spawn(m_itemIndex, transform.position); PlayerStats.Instance().gold -= m_price; }
void OnWeaponPickup(WeaponPickedEvent e) { if (m_weapon != null) { m_weapon.OnDesequip(); m_weapon.SetOwner(null); DropBank.Instance().Spawn(m_dropPrefab, transform.position); } m_weapon = e.weapon; m_dropPrefab = e.dropIndex; if (m_weapon != null) { m_weapon.SetOwner(gameObject); m_weapon.OnEquip(); m_weapon.SetPlayerWeapon(true); } }
private void Awake() { m_instance = this; }