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

39 行
851B

  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace coa4u
  5. {
  6. /// <summary>
  7. /// Instantly moves the target to the given point.
  8. /// </summary>
  9. class ActionSetPlace : ActionInstant
  10. {
  11. protected Vector3 value;
  12. public ActionSetPlace(Vector3 targetPlace)
  13. : base()
  14. {
  15. value = targetPlace;
  16. }
  17. public ActionSetPlace(Vector2 targetPlace)
  18. : this((Vector3)targetPlace)
  19. {
  20. locks = Axises.z;
  21. }
  22. public override ActionInstant Clone()
  23. {
  24. return new ActionSetPlace(value);
  25. }
  26. public override void Start()
  27. {
  28. base.Start();
  29. if (locks != Axises.none)
  30. LockAxises(ref value);
  31. transform.position = value;
  32. }
  33. }
  34. }