0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DoTween メモ

Last updated at Posted at 2021-04-23

処理の遅延

DOVirtual.DelayedCall(待機時間, () => 処理 ).SetLink(gameObject);

値の変動

DOTween.To( () => 変動させる値, (value) => 変動させる値 = value, 最終的な値, 変動時間);

動作の再利用

動作.Pause().SetAutoKill(false).SetLink(gameObject);
// 再生
動作.Restart();

パラメータの再利用

public static TweenParams pauseParams { get; } = new TweenParams();
tweenparams.Pause().SetAutoKill(false).SetLink(gameObject);

動作.SetAs(pauseParams);

Easeing

Set

//動きの加減速
動作.SetEase(Ease.InSine);
//ループ
動作.SetLoop(-1, LoopType.Incremental );
//相対的な動作にする
動作.SetRelative();
//遅延
動作.SetDelay(1f);

再生・停止

//一時停止
動作.Pause();
//再生
動作.Play();
//はじめから再生
動作.Restart();
//終了
動作.Complete();
//破壊(再生不可能になる)
動作.Kill();

Sequence

動作を組み立てて、一つ複雑な動作を作れる。
Append で動作を加え、Join で動作を重ねられる。

Sequence sequence = DOTween.Sequence();
sequence.Append( 動作 );
sequence.Join( 動作 ).Play();

Callback

//開始時に処理を実行
動作.OnStart(() => 処理 );
//更新時に処理を実行
動作.OnUpdate(() => 処理 );
//完了時に処理を実行
動作.OnComplete(() => 処理 );

リンク

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?