BIG UPDATE: Added Shoot Effect and models
This commit is contained in:
@ -101,4 +101,8 @@ public class PlayerComponent : MonoBehaviour
|
||||
health -= damage;
|
||||
if (applyShake) ShakeCamera(15, 5);
|
||||
}
|
||||
public void ShootEffect()
|
||||
{
|
||||
ShakeCamera(1, 2);
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class PlayerInteractionHandler : MonoBehaviour
|
||||
@ -45,6 +46,8 @@ public class PlayerInteractionHandler : MonoBehaviour
|
||||
|
||||
public Transform CarryingPos => carryingPos;
|
||||
|
||||
public UnityEvent onFire;
|
||||
|
||||
// Start is called before the first frame update
|
||||
private void Start()
|
||||
{
|
||||
@ -82,6 +85,7 @@ public class PlayerInteractionHandler : MonoBehaviour
|
||||
pistol.Fire();
|
||||
noiseManager.ShotFired();
|
||||
tempInvent.Remove(pistol.projectileName);
|
||||
onFire.Invoke();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user