You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
643 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Boulder : HeavyObject
{
public GameObject splash;
public GameObject Explosion;
public override void OnWaterStay(WaterController water,float waveHeight)
{
}
public override void OnWaterExit(WaterController water)
{
}
void OnTriggerEnter(Collider other) {
if (other.gameObject.CompareTag("Water")) {
Destroy(Instantiate(splash, transform.position,Quaternion.identity), 2.5f);
}else {
Destroy(Instantiate(Explosion, transform.position, Quaternion.identity), 6);
}
}
}