dev/bolas #11
@ -15,7 +15,6 @@ public class Slow : Status
|
||||
|
||||
// slow entity
|
||||
EntityLinked.SpeedStatusModifier /= _previousSpeedModifier;
|
||||
Debug.Log(_speedModifier);
|
||||
EntityLinked.SpeedStatusModifier *= _speedModifier;
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ using UnityEngine;
|
||||
public abstract class Status : MonoBehaviour
|
||||
{
|
||||
private Entity entityLinked;
|
||||
[SerializeField]
|
||||
protected float _duration;
|
||||
|
||||
protected virtual void Start()
|
||||
|
||||
@ -25,7 +25,7 @@ public class StatusHandler : MonoBehaviour
|
||||
Status status;
|
||||
|
||||
// check if status already exists
|
||||
activeStatuses.TryGetValue(Enum.StatusType.Slow, out status);
|
||||
activeStatuses.TryGetValue(type, out status);
|
||||
|
||||
// if status doesn't exist, instantiate it
|
||||
if (!status)
|
||||
@ -39,10 +39,15 @@ public class StatusHandler : MonoBehaviour
|
||||
}
|
||||
|
||||
// if key value pair doesn't exist, create it
|
||||
// else update the existing one
|
||||
if (!activeStatuses.ContainsKey(type))
|
||||
{
|
||||
activeStatuses.Add(type, status);
|
||||
}
|
||||
else
|
||||
{
|
||||
activeStatuses[type] = status;
|
||||
}
|
||||
}
|
||||
|
||||
// link entity to status
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user