Add damage system and processing system to enemy
This commit is contained in:
24
Assets/Scripts/Events/OnHitEvent.cs
Normal file
24
Assets/Scripts/Events/OnHitEvent.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using static OnHitEvent;
|
||||
|
||||
[System.Serializable]
|
||||
public class OnHitEvent : UnityEvent<Args>
|
||||
{
|
||||
public class Args
|
||||
{
|
||||
public float hitMultiplier;
|
||||
public Damage damage;
|
||||
public GameObject source;
|
||||
|
||||
|
||||
public Args(Damage damage, float hitMultiplier, GameObject source)
|
||||
{
|
||||
this.damage = damage;
|
||||
this.hitMultiplier = hitMultiplier;
|
||||
this.source = source;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user