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