資源簡介
基于dotween可直接在節點上掛載tweenanimation,設定動畫類型,并可預覽
可設置dotweenpath
可設置dotweenpath

代碼片段和文件信息
//?Author:?Daniele?Giardini?-?http://www.demigiant.com
//?Created:?2018/07/13
#if?true?//?MODULE_MARKER
using?System;
using?UnityEngine;
#if?UNITY_5?||?UNITY_2017_1_OR_NEWER
using?UnityEngine.Audio;?//?Required?for?AudioMixer
#endif
#pragma?warning?disable?1591
namespace?DG.Tweening
{
public?static?class?DOTweenModuleAudio
????{
????????#region?Shortcuts
????????#region?Audio
????????///?Tweens?an?AudioSource‘s?volume?to?the?given?value.
????????///?Also?stores?the?AudioSource?as?the?tween‘s?target?so?it?can?be?used?for?filtered?operations
????????///?The?end?value?to?reach?(0?to?1)The?duration?of?the?tween
????????public?static?Tweener?DOFade(this?AudioSource?target?float?endValue?float?duration)
????????{
????????????if?(endValue?0)?endValue?=?0;
????????????else?if?(endValue?>?1)?endValue?=?1;
????????????return?DOTween.To(()?=>?target.volume?x?=>?target.volume?=?x?endValue?duration).SetTarget(target);
????????}
????????///?Tweens?an?AudioSource‘s?pitch?to?the?given?value.
????????///?Also?stores?the?AudioSource?as?the?tween‘s?target?so?it?can?be?used?for?filtered?operations
????????///?The?end?value?to?reachThe?duration?of?the?tween
????????public?static?Tweener?DOPitch(this?AudioSource?target?float?endValue?float?duration)
????????{
????????????return?DOTween.To(()?=>?target.pitch?x?=>?target.pitch?=?x?endValue?duration).SetTarget(target);
????????}
????????#endregion
#if?UNITY_5?||?UNITY_2017_1_OR_NEWER
????????#region?AudioMixer?(Unity?5?or?Newer)
????????///?Tweens?an?AudioMixer‘s?exposed?float?to?the?given?value.
????????///?Also?stores?the?AudioMixer?as?the?tween‘s?target?so?it?can?be?used?for?filtered?operations.
????????///?Note?that?you?need?to?manually?expose?a?float?in?an?AudioMixerGroup?in?order?to?be?able?to?tween?it?from?an?AudioMixer.
????????///?Name?given?to?the?exposed?float?to?set
????????///?The?end?value?to?reachThe?duration?of?the?tween
????????public?static?Tweener?DOSetFloat(this?AudioMixer?target?string?floatName?float?endValue?float?duration)
????????{
????????????return?DOTween.To(()=>?{
????????????????????float?currVal;
????????????????????target.GetFloat(floatName?out?currVal);
????????????????????return?currVal;
????????????????}?x=>?target.SetFloat(floatName?x)?endValue?duration)
????????????????.SetTarget(target);
????????}
????????#region?Operation?Shortcuts
????????///?
????????///?Completes?all?tweens?that?have?this?target?as?a?reference
????????///?(meaning?tweens?that?were?started?from?this?target?or?that?had?this?target?added?as?an?Id)
????????///?and?returns?the?total?number?of?tweens?completed
????????///?(meaning?the?tweens?that?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????27231??2019-09-21?17:59??DOTweenPro\DOTweenAnimation.cs
?????文件????????243??2019-09-21?17:59??DOTweenPro\DOTweenAnimation.cs.me
?????文件??????15872??2019-09-21?17:59??DOTweenPro\DOTweenPro.dll
?????文件???????2469??2019-09-21?17:59??DOTweenPro\DOTweenPro.dll.mdb
?????文件????????155??2019-09-21?17:59??DOTweenPro\DOTweenPro.dll.mdb.me
?????文件????????569??2019-09-21?17:59??DOTweenPro\DOTweenPro.dll.me
?????文件???????2185??2019-09-21?17:59??DOTweenPro\DOTweenPro.xm
?????文件????????158??2019-09-21?17:59??DOTweenPro\DOTweenPro.xm
?????文件???????4084??2019-09-21?17:59??DOTweenPro\DOTweenProShortcuts.cs
?????文件????????243??2019-09-21?17:59??DOTweenPro\DOTweenProShortcuts.cs.me
?????文件??????22718??2019-09-21?17:59??DOTweenPro\DOTweenTextMeshPro.cs
?????文件????????243??2019-09-21?17:59??DOTweenPro\DOTweenTextMeshPro.cs.me
?????文件??????13743??2019-09-21?17:59??DOTweenPro\DOTweenTk2d.cs
?????文件????????243??2019-09-21?17:59??DOTweenPro\DOTweenTk2d.cs.me
?????文件??????35346??2019-09-21?17:59??DOTweenPro\Editor\DOTweenAnimationInspector.cs
?????文件????????243??2019-09-21?17:59??DOTweenPro\Editor\DOTweenAnimationInspector.cs.me
?????文件??????11363??2019-09-21?17:59??DOTweenPro\Editor\DOTweenPreviewManager.cs
?????文件????????243??2019-09-21?17:59??DOTweenPro\Editor\DOTweenPreviewManager.cs.me
?????文件??????28672??2019-09-21?17:59??DOTweenPro\Editor\DOTweenProEditor.dll
?????文件???????4053??2019-09-21?17:59??DOTweenPro\Editor\DOTweenProEditor.dll.mdb
?????文件????????155??2019-09-21?17:59??DOTweenPro\Editor\DOTweenProEditor.dll.mdb.me
?????文件????????569??2019-09-21?17:59??DOTweenPro\Editor\DOTweenProEditor.dll.me
?????文件????????542??2019-09-21?17:59??DOTweenPro\Editor\DOTweenProEditor.xm
?????文件????????158??2019-09-21?17:59??DOTweenPro\Editor\DOTweenProEditor.xm
?????文件????????172??2019-09-21?17:59??DOTweenPro\Editor.me
?????文件???????2439??2019-09-21?17:59??DOTweenPro\readme.txt
?????文件????????158??2019-09-21?17:59??DOTweenPro\readme.txt.me
?????文件???????9728??2019-09-21?17:59??DemiLib\Core\DemiLib.dll
?????文件???????2517??2019-09-21?17:59??DemiLib\Core\DemiLib.dll.mdb
?????文件????????155??2019-09-21?17:59??DemiLib\Core\DemiLib.dll.mdb.me
............此處省略262個文件信息
評論
共有 條評論