first location is playable
enemies and so on
This commit is contained in:
1 parent
6fb38310bc
commit
2c6d4e500f
18 files changed
+2565
-31
No files matched your search
@@ -0,0 +1,19 @@
|
||||
using Code.Gameplay.Player;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Gameplay.Enemies
|
||||
{
|
||||
public class VoidEnemy : MonoBehaviour, IEnemy
|
||||
{
|
||||
public void TakeDamage() { }
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
var playerHealth = other.GetComponent<PlayerHealth>();
|
||||
playerHealth?.TakeDamage(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user