alot of stuff i forgot to commit
This commit is contained in:
parent
fc2329a873
commit
b8d516e734
60 changed files with 7397 additions and 64 deletions
27
Assets/Scripts/Effects/Effect.cs
Normal file
27
Assets/Scripts/Effects/Effect.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class Effect : ScriptableObject
|
||||
{
|
||||
[SerializeField] private EffectInstance effectInstanceObject;
|
||||
[Header("Stats")]
|
||||
public float duration;
|
||||
public bool isConstant; //that means if it uses the tick function or not
|
||||
|
||||
public virtual void ApplyEffect(EntityStats affectedEntity)
|
||||
{
|
||||
EffectInstance newEffectInstance = Instantiate(effectInstanceObject, affectedEntity.transform);
|
||||
newEffectInstance.affectedEntity = affectedEntity;
|
||||
newEffectInstance.thisEffect = this;
|
||||
|
||||
}
|
||||
|
||||
public virtual void EffectTick(EntityStats affectedEntity)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void RemoveEffect(EntityStats affectedEntity)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue