Added basic features
This commit is contained in:
14
Assets/Scripts/Contracts/IDamageable.cs
Normal file
14
Assets/Scripts/Contracts/IDamageable.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
public struct DamageData
|
||||
{
|
||||
public float oldHealth;
|
||||
public float newHealth;
|
||||
public float damageAmount;
|
||||
}
|
||||
|
||||
public delegate void DamageEventHandler(DamageData damageData);
|
||||
|
||||
public interface IDamageable
|
||||
{
|
||||
public event DamageEventHandler OnDamageTaken;
|
||||
void Damage(float damageAmount);
|
||||
}
|
||||
2
Assets/Scripts/Contracts/IDamageable.cs.meta
Normal file
2
Assets/Scripts/Contracts/IDamageable.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ceb72078282f284688bc98969182b04
|
||||
Reference in New Issue
Block a user