1
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
// Don't forget to add this.
|
||||
using CameraShake;
|
||||
|
||||
public class ExplosionTrigger : MonoBehaviour
|
||||
{
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0))
|
||||
{
|
||||
FindObjectOfType<Explosion>().Explode();
|
||||
|
||||
// Shaking the camera.
|
||||
CameraShaker.Presets.ShortShake2D();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user