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;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Events/OnHitEvent.cs.meta
Normal file
11
Assets/Scripts/Events/OnHitEvent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a10378074ffe5fa48aadc459fe8c38ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user