Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class BulletManager : MonoBehaviour
- {
- public MPPlayer shooterPlayer;
- public float destroyTimer = 5;
- public float damage = 0;
- void Start()
- {
- Destroy(gameObject, destroyTimer);
- }
- void OnCollisionEnter(Collision col)
- {
- col.transform.SendMessageUpwards("GetBulletDamage", damage, SendMessageOptions.DontRequireReceiver);
- Destroy(gameObject);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement