Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class DestroyCubes : MonoBehaviour
- {
- public float AmountOfDamage;
- void OnCollisionEnter (Collision col)
- {
- if(col.gameObject.name == "FPSController")
- {
- GetComponent<Character>().Health - AmountOfDamage;
- GetComponent<Character>().Health >= AmountOfDamage;
- Application.LoadLevel("FPS");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement