28 lines
574 B
C#
28 lines
574 B
C#
![]() |
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class Bullet : MonoBehaviour
|
||
|
{
|
||
|
private void OnCollisionEnter(Collision collision)
|
||
|
{
|
||
|
if (collision.gameObject.CompareTag("enemy"))
|
||
|
{
|
||
|
Destroy(this.gameObject);
|
||
|
}
|
||
|
if (collision.gameObject.CompareTag("ore"))
|
||
|
{
|
||
|
Destroy(this.gameObject);
|
||
|
Destroy(this.gameObject);
|
||
|
}
|
||
|
}
|
||
|
void OnParticleCollision(GameObject other)
|
||
|
{
|
||
|
if (other.tag == "enemy")
|
||
|
{
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|