EntityExt.cs 443 B

1234567891011121314151617
  1. using XGame.Framework.Map;
  2. namespace FL.Battle
  3. {
  4. public static class EntityExt
  5. {
  6. public static MoveComponent MoveCom(this IEntityView entity)
  7. {
  8. return entity.GetComponent<MoveComponent>();
  9. }
  10. public static void MoveTo(this IEntityView entity, MoveArgs args)
  11. {
  12. var component = entity.GetComponent<MoveComponent>();
  13. component.MoveTo(args);
  14. }
  15. }
  16. }