Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public class HitBox : MonoBehaviour {
  2.  
  3. public Statistics StatisticsToChange;
  4. public GameObject GameObjectToDestroy;
  5. public GameObject GameObjectToDrop;
  6.  
  7. void Update()
  8. {
  9. if(StatisticsToChange.Health == 0)
  10. {
  11. Instantiate(GameObjectToDrop);
  12. GameObjectToDrop.transform.position = GameObjectToDestroy.transform.position;
  13. Destroy(GameObjectToDestroy);
  14.  
  15. }
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement