您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

CalcerPosition.cs 787B

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