Behavior Canceling & Grouping

Behaviors are now grouped, behaviors within a group can cancel execution of the rest of the group
This commit is contained in:
hyperion51 2020-05-11 01:17:10 +01:00
commit fc94531566
35 changed files with 613 additions and 190 deletions

View file

@ -48,7 +48,7 @@ public class TowingController : IBehavior, IPersistentBehavior, IController
_velocityMatch = new VelocityMatch(_context, _entity, _data);
}
public void Update(float delta)
public bool Update(float delta)
{
if (_path.Any())
{
@ -119,6 +119,7 @@ public class TowingController : IBehavior, IPersistentBehavior, IController
_velocityMatch.Update(delta);
}
}
return true;
}
public PersistentBehaviorData Store()
@ -148,6 +149,10 @@ public class TowingController : IBehavior, IPersistentBehavior, IController
{
_locomotion.Objective = _context.WormholePosition(_entity.Zone, _path[0].ZoneID);
}
public void Remove()
{
}
}
public class TowingControllerPersistence : PersistentBehaviorData