選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。

33 行
602B

  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. class ActionSetPlace : Action
  5. {
  6. protected Vector3 value;
  7. public ActionSetPlace(Vector3 tgtPlace)
  8. : base()
  9. {
  10. value = tgtPlace;
  11. }
  12. public ActionSetPlace(Vector2 tgtPlace)
  13. : this((Vector3) tgtPlace)
  14. {
  15. is2d = true;
  16. }
  17. public override Action clone()
  18. {
  19. return new ActionSetPlace(value);
  20. }
  21. public override void start()
  22. {
  23. base.start();
  24. if (is2d)
  25. value.z = transform.position.z;
  26. transform.position = value;
  27. }
  28. }