Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

PredicateDistanceGreater.cs 699B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. using System.Collections.Generic;
  3. using System.Collections;
  4. namespace coa4u
  5. {
  6. public class PredicateDistanceGreater : Predicate
  7. {
  8. protected CalcerVector first;
  9. protected CalcerVector second;
  10. protected float distance;
  11. public PredicateDistanceGreater(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. }