Added camera shake
This commit is contained in:
parent
fadffbc004
commit
52219deef9
@ -1,4 +1,5 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using DG.Tweening;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -469,7 +470,7 @@ public class ChasePlayerController : MonoBehaviour
|
|||||||
public void OnObstacleHit()
|
public void OnObstacleHit()
|
||||||
{
|
{
|
||||||
if (waitingForGameOver) return;
|
if (waitingForGameOver) return;
|
||||||
|
Camera.main.DOShakePosition(0.25f, new Vector3(0.15f,0.15f,0.15f),20);
|
||||||
if (Time.time - lastObstacleHitTime <= secondHitWindow)
|
if (Time.time - lastObstacleHitTime <= secondHitWindow)
|
||||||
{
|
{
|
||||||
waitingForGameOver = true;
|
waitingForGameOver = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user