Add NPC and Power-Up features with associated prefabs and effects
This commit is contained in:
10
Assets/Scripts/Core/Domain/Status/Effects/EffectColors.cs
Normal file
10
Assets/Scripts/Core/Domain/Status/Effects/EffectColors.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Core.Domain.Status.Effects
|
||||
{
|
||||
public struct EffectColors
|
||||
{
|
||||
public static readonly Color LightFootedColor = new Color(0.8f, 0.8f, 0.8f);
|
||||
public static readonly Color SpeedBoostColor = new Color(1f, 0.5f, 0f);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca5a45bf5f154f009511ace70bfc78aa
|
||||
timeCreated: 1765576663
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace Core.Domain.Status.Effects
|
||||
{
|
||||
public class SpeedBoostEffect : IStatusEffect
|
||||
{
|
||||
private float _duration;
|
||||
private readonly float _multiplier;
|
||||
|
||||
public bool IsExpired => _duration <= 0;
|
||||
|
||||
public SpeedBoostEffect(float duration, float multiplier = 1.5f)
|
||||
{
|
||||
_duration = duration;
|
||||
_multiplier = multiplier;
|
||||
}
|
||||
|
||||
public void Tick(float deltaTime)
|
||||
{
|
||||
_duration -= deltaTime;
|
||||
}
|
||||
|
||||
public void ModifyCapabilities(ref PlayerCapabilities caps)
|
||||
{
|
||||
caps.SpeedMultiplier = _multiplier;
|
||||
}
|
||||
|
||||
public void OnApply() { }
|
||||
public void OnRemove() { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8fdc1e67835247f6a2afc26cc4ed27a8
|
||||
timeCreated: 1765576232
|
||||
Reference in New Issue
Block a user