Commit 5be33402 authored by 15박보승's avatar 15박보승

피격이펙트 추가

parent 22da2ee7
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -20,6 +20,9 @@ public class CameraController : MonoBehaviour
[SerializeField]
private LayerMask blockMask;
[SerializeField]
private ParticleSystem hitEffect;
private void Start()
{
cam = GetComponent<Camera>();
......@@ -51,6 +54,11 @@ public class CameraController : MonoBehaviour
*/
}
public void PlayHitEffect()
{
hitEffect.Play();
}
private void LateUpdate()
{
......
......@@ -147,5 +147,6 @@ public class PlayerController : MonoBehaviour
public void GetDamaged(int damage)
{
Health = Mathf.Max(0, Health - damage);
Camera.main.GetComponent<CameraController>().PlayHitEffect();
}
}
\ No newline at end of file
......@@ -29,7 +29,7 @@ public class WeaponBehaviour : MonoBehaviour
private void Start()
{
weapon = new Gun(gunDamage,gunRange, bulletEffect);
weapon = new Knife(knifeDamage, knifeRange, bulletEffect, transform);
IngameUIManager.inst.UpdateWeaponTypeUI(WeaponType.GUN);
}
private void Update()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment