Ejemplo n.º 1
0
    void Pickup(Collider player)
    {
        Instantiate(pickupEffect, transform.position, transform.rotation);

        player_oxygen stats = player.GetComponent <player_oxygen>();

        stats.currentHealth += 250;

        Destroy(gameObject);
    }
Ejemplo n.º 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         refill.Play();
         player_oxygen stats = other.GetComponent <player_oxygen>();
         stats.currentHealth += 200;
         Destroy(gameObject);
         //Pickup(other);
     }
 }
Ejemplo n.º 3
0
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            Instantiate(pickupEffect, transform.position, transform.rotation);
            refill.Play();

            player_oxygen stats = other.GetComponent <player_oxygen>();
            stats.currentHealth += 500;

            Destroy(gameObject);
            //Pickup(other);
        }
    }