Skip to content
Permalink
1d0e265c8a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
25 lines (20 sloc) 513 Bytes
using UnityEngine;
using System.Collections;
public class Boundries : MonoBehaviour
{
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("EnemyBullet"))
{
Destroy(collision.gameObject);
}
if (collision.gameObject.CompareTag("Enemy"))
{
Destroy(collision.gameObject);
}
if (collision.gameObject.CompareTag("Bullet"))
{
Destroy(collision.gameObject);
}
}
}