FiE-Game/Assets/Scripts/Fie/Object/FieStatusEffectsBase.cs

39 lines
759 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using UnityEngine;
namespace Fie.Object
{
public class FieStatusEffectsBase : MonoBehaviour
{
[SerializeField]
protected bool _isActive = true;
[SerializeField]
protected bool _isOnlyStatusEffect;
[SerializeField]
protected float _duration;
protected FieStatusEffectEntityBase _entity;
protected void Awake()
{
FieEmittableObjectBase component = GetComponent<FieEmittableObjectBase>();
if (!(component == null))
{
if (_entity == null)
{
_entity = GetStatusEffectEntity();
}
_entity.isOnlyStatusEffect = _isOnlyStatusEffect;
_entity.duration = _duration;
component.AddStatusEffect(_entity);
}
}
public virtual FieStatusEffectEntityBase GetStatusEffectEntity()
{
return null;
}
}
}