Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class AIDamage : MonoBehaviour {
- // This is how much damage that will be delt to player if
- //AI Hits our character.
- //Player has a total of 100 health!!!!
- public float Damage = 1000;
- void OnTriggerEnter(Collider col){
- if (col.gameObject.tag == "Player") {
- col.gameObject.GetComponent<BasicHealth>().TakeDamage (Damage);
- Debug.Log ("HIT");
- }
- }
- }// THIS IS FOR TRIGGERING DAMAGE TO PLAYER.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement