汎用的な補間アクションの基底クラス。set/get 関数をセットします。 抽象クラス。 [詳細]
Public メソッド | |
| delegate void | DSet (T value) |
| set関数のデリゲート。 | |
| delegate T | DGet () |
| get関数のデリゲート。 | |
| ActionTweenGeneric () | |
| コンストラクタ。 | |
| ActionTweenGeneric (DGet dget, DSet dset) | |
| コンストラクタ。 | |
| override void | Run () |
| アクションをキックします。 | |
| override void | Update (float dt) |
| Update関数。 | |
Public 変数 | |
| T | TargetValue |
| ターゲットの値。 | |
| bool | IsRelative = false |
| trueの場合、ターゲットの値はオフセットです。 | |
| DTween | Tween = (t) => Math.PowEaseOut(t,4.0f) |
| Tween/補間の関数。基本的に xが0から1になるとき、f(x)が0から1になる f(x)です。 | |
| DSet | Set |
| tweenを実行しているとき、現在の値をセットする関数。 | |
| DGet | Get |
| tweenを実行しているとき、現在の値を取得する関数。 | |
汎用的な補間アクションの基底クラス。set/get 関数をセットします。 抽象クラス。
| DTween Tween = (t) => Math.PowEaseOut(t,4.0f) |
Tween/補間の関数。基本的に xが0から1になるとき、f(x)が0から1になる f(x)です。
DTween を設定可能な関数の例です。
(t) => Math.Linear(t);
(t) => Math.ExpEaseIn(t,1.0f);
(t) => Math.ExpEaseOut(t,1.0f);
(t) => Math.PowEaseIn(t,4.0f);
(t) => Math.PowEaseOut(t,4.0f);
(t) => Math.PowEaseInOut(t,4.0f);
(t) => Math.BackEaseIn(t,1.0f);
(t) => Math.BackEaseOut(t,1.0f);
(t) => Math.BackEaseInOut(t,1.0f);
(t) => Math.PowerfulScurve(t,3.7f,3.7f);
(t) => Math.Impulse(t,10.0f);
(t) => FMath.Sin(t*Math.Pi*0.5f); // for sin curve tween
tweenの詳細については、cocos2dのドキュメントを参考にしてください。
http://www.robertpenner.com/easing/easing_demo.html
http://www.robertpenner.com/easing/penner_chapter7_tweening.pdf