Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Stash : MonoBehaviour
- {
- public Collider2D stashCollider;
- public Bars umbrellaBar;
- public float refillValue; //The amount regained
- private void OnCollisionEnter(Collision collision)
- {
- if(Input.GetKeyDown(KeyCode.E))
- {
- umbrellaBar.currentHealth += refillValue;
- }
- }
- }
Advertisement
RAW Paste Data
Copied
Advertisement