Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HitBox : MonoBehaviour {
- public Statistics StatisticsToChange;
- public GameObject GameObjectToDestroy;
- public GameObject GameObjectToDrop;
- void Update()
- {
- if(StatisticsToChange.Health == 0)
- {
- Instantiate(GameObjectToDrop);
- GameObjectToDrop.transform.position = GameObjectToDestroy.transform.position;
- Destroy(GameObjectToDestroy);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement