You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

29 lines
694B

  1. using UnityEngine;
  2. using System.Collections.Generic;
  3. using System.Collections;
  4. namespace coa4u
  5. {
  6. public class PredicateDistanceLess : Predicate
  7. {
  8. protected CalcerVector first;
  9. protected CalcerVector second;
  10. protected float distance;
  11. public PredicateDistanceLess(CalcerVector one, CalcerVector other, float dist)
  12. : base()
  13. {
  14. first = one;
  15. second = other;
  16. distance = dist;
  17. }
  18. public override bool check()
  19. {
  20. if (Vector3.Distance(first.value, second.value) <= distance)
  21. return true;
  22. else
  23. return false;
  24. }
  25. }
  26. }