|
|
@ -4,8 +4,9 @@ using UnityEngine; |
|
|
|
|
|
|
|
public class Boulder : HeavyObject |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
public GameObject splash; |
|
|
|
public GameObject Explosion; |
|
|
|
|
|
|
|
public override void OnWaterStay(WaterController water,float waveHeight) |
|
|
|
{ |
|
|
|
} |
|
|
@ -13,4 +14,17 @@ public class Boulder : HeavyObject |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |