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.

PredicateDistanceLess.cs 694B

1234567891011121314151617181920212223242526272829
  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. }