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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user