Exemple #1
0
    public override void ApplyLoot(GameObject player)
    {
        base.ApplyLoot(player);

        DropBank.Instance().Spawn(m_itemIndex, transform.position);

        PlayerStats.Instance().gold -= m_price;
    }
Exemple #2
0
    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);
        }
    }
Exemple #3
0
 private void Awake()
 {
     m_instance = this;
 }