using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScreenShakeActions : MonoBehaviour
{
private void Start() {
ShootAction.onAnyShoot += ShootAction_OnAnyShoot;
GrenadeProjectile.OnAnyGrenadeExploded += GrenadePorjectile_OnAnyGrenadeExploded;
SwordAction.onAnySwordHit += SwordAction_onAnySwordHit;
}
private void SwordAction_onAnySwordHit(object sender, EventArgs e)
{
ScreenShake.Instance.Shake(2f);
}
private void GrenadePorjectile_OnAnyGrenadeExploded(object sender, EventArgs e)
{
ScreenShake.Instance.Shake(5f);
}
private void ShootAction_OnAnyShoot(object sender, ShootAction.onShootEventArgs e)
{
ScreenShake.Instance.Shake();
}
}