mirror of
https://github.com/chibicitiberiu/frica-de-gaze
synced 2024-02-24 08:23:32 +00:00
30 lines
470 B
C#
30 lines
470 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class BallCollisionWithSpider : MonoBehaviour {
|
|
|
|
public AudioSource SoundToPlay;
|
|
|
|
void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.name.Contains ("Spider"))
|
|
{
|
|
Destroy (gameObject);
|
|
Destroy (other.gameObject);
|
|
|
|
SoundToPlay.enabled = true;
|
|
SoundToPlay.Play ();
|
|
}
|
|
}
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
}
|