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.

36 lines
787B

  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace coa4u
  5. {
  6. public class CalcerPosition : CalcerVector
  7. {
  8. Actor targetActor;
  9. Transform targetTransform;
  10. public CalcerPosition(Actor target)
  11. : base()
  12. {
  13. this.targetActor = target;
  14. }
  15. public CalcerPosition(Transform target)
  16. : base()
  17. {
  18. this.targetTransform = target;
  19. }
  20. public override Vector3 value
  21. {
  22. get
  23. {
  24. if (targetTransform != null)
  25. return (Vector3)targetTransform.position;
  26. else
  27. return (Vector3)targetActor.transformCached.position;
  28. }
  29. }
  30. }
  31. }