選択できるのは25トピックまでです。
トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。
|
- using System;
- using System.Collections.Generic;
- using UnityEngine;
-
- class ActionSetPlace : Action
- {
- protected Vector3 value;
-
- public ActionSetPlace(Vector3 tgtPlace)
- : base()
- {
- value = tgtPlace;
- }
-
- public ActionSetPlace(Vector2 tgtPlace)
- : this((Vector3) tgtPlace)
- {
- is2d = true;
- }
-
- public override Action clone()
- {
- return new ActionSetPlace(value);
- }
-
- public override void start()
- {
- base.start();
- if (is2d)
- value.z = transform.position.z;
- transform.position = value;
- }
- }
|