gutterball-3/Gutterball 3/Assets/Scripts/WaterSplash.cs
SkunkStudios 71779ef7ac New Version 1.6
New 125 balls & powerups.
Improved graphics.
2025-05-07 06:18:40 +07:00

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);
}
}
}