Update layers for GameObjects and add EnemyDeathBehavior class
This commit is contained in:
15
Assets/Scripts/Systems/EnemyDeathBehavior.cs
Normal file
15
Assets/Scripts/Systems/EnemyDeathBehavior.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Interfaces;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Systems
|
||||
{
|
||||
public class EnemyDeathBehavior : MonoBehaviour, IDeathBehavior
|
||||
{
|
||||
public void Die()
|
||||
{
|
||||
Destroy(gameObject);
|
||||
// later let's add particle effects, sound effects, etc.
|
||||
// and give player experience points
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/Scripts/Systems/EnemyDeathBehavior.cs.meta
Normal file
3
Assets/Scripts/Systems/EnemyDeathBehavior.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73900af7351645fdb19d016d621feb35
|
||||
timeCreated: 1752264813
|
Reference in New Issue
Block a user