mirror of
https://github.com/imperialsushi/gutterball-3.git
synced 2025-06-15 05:07:42 +00:00
29 lines
602 B
C#
29 lines
602 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class WaterSplash : MonoBehaviour
|
|
{
|
|
public GameObject splash;
|
|
|
|
// Use this for initialization
|
|
void Start ()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update ()
|
|
{
|
|
|
|
}
|
|
|
|
void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.CompareTag("Ball") || other.CompareTag("Pin"))
|
|
{
|
|
Vector3 splashPosition = new Vector3(other.transform.position.x, transform.position.y, other.transform.position.z);
|
|
Instantiate(splash, splashPosition, Quaternion.identity);
|
|
}
|
|
}
|
|
}
|