This commit is contained in:
Sveske Juice 2024-04-21 12:24:41 +02:00
parent cda440399b
commit 814d455eab
2 changed files with 6 additions and 7 deletions

View File

@ -52,7 +52,7 @@ MonoBehaviour:
m_Calls:
- m_Target: {fileID: 369596802107988542}
m_TargetAssemblyTypeName: HealthComponent, Assembly-CSharp
m_MethodName: SimpleKill
m_MethodName: EnemyKill
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}

View File

@ -34,16 +34,15 @@ public class HealthComponent : MonoBehaviour
OnHealthZero?.Invoke();
}
public void EnemyKill()
{
Destroy(gameObject);
}
public void SimpleKill()
{
CameraShake.instance.ShakeCamera(0.5f, 0.2f);
var cam = CinemachineCore.Instance.GetActiveBrain(0).ActiveVirtualCamera.Priority -= 1;
CinemachineCore.Instance.GetActiveBrain(0).ActiveVirtualCamera.VirtualCameraGameObject.GetComponent<CinemachineCameraOffset>().m_Offset.z = TowerCam.instance.originalOffset;
HideWall.instance.target = null;
Destroy(gameObject);
}
}