Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4.  
  5. public class DestroyCubes : MonoBehaviour
  6. {
  7. public float AmountOfDamage;
  8.  
  9. void OnCollisionEnter (Collision col)
  10. {
  11. if(col.gameObject.name == "FPSController")
  12. {
  13. GetComponent<Character>().Health - AmountOfDamage;
  14. GetComponent<Character>().Health >= AmountOfDamage;
  15. Application.LoadLevel("FPS");
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement