Entity Destruction
Added multiple turret enemies Added ability to destroy enemies Fixed bug where player could target themselves Fixed bug where targeting new enemy freezes schematic hit animation Fixed bug where target lock progress could persist when targeting new enemy
This commit is contained in:
parent
eaedf0cee8
commit
e3de7158fd
13 changed files with 1937 additions and 1124 deletions
|
|
@ -50,6 +50,8 @@ public class TargetLock : IBehavior, IAlwaysUpdatedBehavior
|
|||
public float DirectionImpact { get; private set; }
|
||||
public float Decay { get; private set; }
|
||||
|
||||
private Entity _target;
|
||||
|
||||
public TargetLock(ItemManager context, TargetLockData data, Entity entity, EquippedItem item)
|
||||
{
|
||||
Context = context;
|
||||
|
|
@ -66,6 +68,11 @@ public class TargetLock : IBehavior, IAlwaysUpdatedBehavior
|
|||
|
||||
public void Update(float delta)
|
||||
{
|
||||
if (_target != Entity.Target.Value)
|
||||
{
|
||||
Lock = 0;
|
||||
_target = Entity.Target.Value;
|
||||
}
|
||||
if (Entity.Target.Value != null)
|
||||
{
|
||||
Speed = Context.Evaluate(_data.Speed, Item.EquippableItem, Entity);
|
||||
|
|
|
|||
Loading…
Reference in a new issue