1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2026-02-04 22:34:56 +08:00

Extra tests for Win8.1

This commit is contained in:
Daniele Giardini 2015-04-13 14:01:16 +02:00
parent 472044c705
commit c82c606db2
61 changed files with 113 additions and 23 deletions

View File

@ -0,0 +1,11 @@
using UnityEngine;
using System.Collections;
using DG.Tweening;
public class TempPro : MonoBehaviour
{
void Start()
{
transform.DOMove(new Vector3(4,0,0), 1).From(true).SetDelay(1);
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a23af4cabef4a60458b7cea8f64c6bc4
timeCreated: 1428922934
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,14 +7,13 @@ using System;
public class TempTests : BrainBase public class TempTests : BrainBase
{ {
public Transform target; void OnEnable()
public Ease ease = Ease.Linear;
void OnGUI()
{ {
if (GUILayout.Button("SHAKE")) { Debug.Log("ENABLE");
target.DOKill(); }
target.DOShakePosition(4, 1, 3).SetEase(ease);
} void OnDisable()
{
Debug.Log("DISABLE");
} }
} }

View File

@ -33,7 +33,8 @@ public class UIMisc : BrainBase
circleOutT.DORotate(new Vector3(0,0,360), 0.5f, RotateMode.FastBeyond360).SetEase(Ease.Linear).SetLoops(-1); circleOutT.DORotate(new Vector3(0,0,360), 0.5f, RotateMode.FastBeyond360).SetEase(Ease.Linear).SetLoops(-1);
circleInT.DORotate(new Vector3(0,0,-360), 2f, RotateMode.FastBeyond360).SetEase(Ease.Linear).SetLoops(-1); circleInT.DORotate(new Vector3(0,0,-360), 2f, RotateMode.FastBeyond360).SetEase(Ease.Linear).SetLoops(-1);
// Move // Move
moveT.DOMoveX(50, 1, true).SetRelative().SetEase(Ease.InOutQuad).SetLoops(-1, LoopType.Yoyo); // moveT.DOMoveX(50, 1, true).SetRelative().SetEase(Ease.InOutQuad).SetLoops(-1, LoopType.Yoyo);
moveT.DOAnchorPos3D(new Vector2(50, 0), 1, true).SetRelative().SetEase(Ease.InOutQuad).SetLoops(-1, LoopType.Yoyo);
// Text // Text
DOTween.Sequence() DOTween.Sequence()

View File

@ -201,6 +201,11 @@
<param name="sequencesCapacity">Max Sequences capacity. <param name="sequencesCapacity">Max Sequences capacity.
Default: 50</param> Default: 50</param>
</member> </member>
<member name="T:DG.Tweening.Core.Debugger">
<summary>
Public so it can be used by lose scripts related to DOTween (like DOTweenAnimation)
</summary>
</member>
<member name="T:DG.Tweening.Sequence"> <member name="T:DG.Tweening.Sequence">
<summary> <summary>
Controls other tweens as a group Controls other tweens as a group
@ -1040,6 +1045,11 @@
Also stores the transform as the tween's target so it can be used for filtered operations</summary> Also stores the transform as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions.DOScale(UnityEngine.Transform,System.Single,System.Single)">
<summary>Tweens a Transform's localScale uniformly to the given value.
Also stores the transform as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions.DOScaleX(UnityEngine.Transform,System.Single,System.Single)"> <member name="M:DG.Tweening.ShortcutExtensions.DOScaleX(UnityEngine.Transform,System.Single,System.Single)">
<summary>Tweens a Transform's X localScale to the given value. <summary>Tweens a Transform's X localScale to the given value.
Also stores the transform as the tween's target so it can be used for filtered operations</summary> Also stores the transform as the tween's target so it can be used for filtered operations</summary>
@ -1265,14 +1275,14 @@
and returns the total number of tweens played. and returns the total number of tweens played.
</summary> </summary>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions.DORestart(UnityEngine.Component)"> <member name="M:DG.Tweening.ShortcutExtensions.DORestart(UnityEngine.Component,System.Boolean)">
<summary> <summary>
Restarts all tweens that have this target as a reference Restarts 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) (meaning tweens that were started from this target, or that had this target added as an Id)
and returns the total number of tweens restarted. and returns the total number of tweens restarted.
</summary> </summary>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions.DORewind(UnityEngine.Component)"> <member name="M:DG.Tweening.ShortcutExtensions.DORewind(UnityEngine.Component,System.Boolean)">
<summary> <summary>
Rewinds all tweens that have this target as a reference Rewinds 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) (meaning tweens that were started from this target, or that had this target added as an Id)
@ -1664,6 +1674,10 @@
<summary>Plays all tweens with the given ID or target and returns the number of actual tweens played <summary>Plays all tweens with the given ID or target and returns the number of actual tweens played
(meaning the tweens that were not already playing or complete)</summary> (meaning the tweens that were not already playing or complete)</summary>
</member> </member>
<member name="M:DG.Tweening.DOTween.Play(System.Object,System.Object)">
<summary>Plays all tweens with the given target and the given ID, and returns the number of actual tweens played
(meaning the tweens that were not already playing or complete)</summary>
</member>
<member name="M:DG.Tweening.DOTween.PlayBackwardsAll"> <member name="M:DG.Tweening.DOTween.PlayBackwardsAll">
<summary>Plays backwards all tweens and returns the number of actual tweens played <summary>Plays backwards all tweens and returns the number of actual tweens played
(meaning tweens that were not already started, playing backwards or rewinded)</summary> (meaning tweens that were not already started, playing backwards or rewinded)</summary>
@ -1686,6 +1700,10 @@
<member name="M:DG.Tweening.DOTween.Restart(System.Object,System.Boolean)"> <member name="M:DG.Tweening.DOTween.Restart(System.Object,System.Boolean)">
<summary>Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted</summary> <summary>Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted</summary>
</member> </member>
<member name="M:DG.Tweening.DOTween.Restart(System.Object,System.Object,System.Boolean)">
<summary>Restarts all tweens with the given target and the given ID, and returns the number of actual tweens played
(meaning the tweens that were not already playing or complete)</summary>
</member>
<member name="M:DG.Tweening.DOTween.RewindAll(System.Boolean)"> <member name="M:DG.Tweening.DOTween.RewindAll(System.Boolean)">
<summary>Rewinds and pauses all tweens, then returns the number of actual tweens rewinded <summary>Rewinds and pauses all tweens, then returns the number of actual tweens rewinded
(meaning tweens that were not already rewinded)</summary> (meaning tweens that were not already rewinded)</summary>
@ -1754,6 +1772,32 @@
Path plugin works exclusively with Transforms Path plugin works exclusively with Transforms
</summary> </summary>
</member> </member>
<member name="T:DG.Tweening.EaseFactory">
<summary>
Allows to wrap ease method in special ways, adding extra features
</summary>
</member>
<member name="M:DG.Tweening.EaseFactory.StopMotion(System.Int32,System.Nullable{DG.Tweening.Ease})">
<summary>
Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS
</summary>
<param name="motionFps">FPS at which the tween should be played</param>
<param name="ease">Ease type</param>
</member>
<member name="M:DG.Tweening.EaseFactory.StopMotion(System.Int32,UnityEngine.AnimationCurve)">
<summary>
Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS
</summary>
<param name="motionFps">FPS at which the tween should be played</param>
<param name="animCurve">AnimationCurve to use for the ease</param>
</member>
<member name="M:DG.Tweening.EaseFactory.StopMotion(System.Int32,DG.Tweening.EaseFunction)">
<summary>
Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS
</summary>
<param name="motionFps">FPS at which the tween should be played</param>
<param name="customEase">Custom ease function to use</param>
</member>
<member name="T:DG.Tweening.LoopType"> <member name="T:DG.Tweening.LoopType">
<summary> <summary>
Types of loop Types of loop
@ -1857,6 +1901,7 @@
<member name="T:DG.Tweening.Core.Easing.EaseCurve"> <member name="T:DG.Tweening.Core.Easing.EaseCurve">
<summary> <summary>
Used to interpret AnimationCurves as eases. Used to interpret AnimationCurves as eases.
Public so it can be used by external ease factories
</summary> </summary>
</member> </member>
<member name="T:DG.Tweening.Core.Easing.Bounce"> <member name="T:DG.Tweening.Core.Easing.Bounce">

View File

@ -12,6 +12,7 @@ public class TestScene : MonoBehaviour
{ {
public Text logText; public Text logText;
public Transform target; public Transform target;
public TextMesh text;
string log; string log;
string logPrefix = "\n➨ "; string logPrefix = "\n➨ ";
@ -25,6 +26,8 @@ public class TestScene : MonoBehaviour
ITweenPlugin idotweenClass; ITweenPlugin idotweenClass;
string testId; string testId;
int intToTween;
IEnumerator Start() IEnumerator Start()
{ {
FloatTest(); FloatTest();
@ -47,6 +50,7 @@ public class TestScene : MonoBehaviour
yield return null; yield return null;
target.DOMove(new Vector3(3, 0, 0), 2); target.DOMove(new Vector3(3, 0, 0), 2);
// DOTween.To(()=>intToTween, x=> intToTween = x, 100, 4).OnUpdate(()=> text.text = intToTween.ToString());
} }
void DOTweenVector3Test() void DOTweenVector3Test()

Binary file not shown.

View File

@ -21,7 +21,7 @@ namespace DG.Tweening
public class DOTween public class DOTween
{ {
/// <summary>DOTween's version</summary> /// <summary>DOTween's version</summary>
public static readonly string Version = "1.0.470"; public static readonly string Version = "1.0.480";
/////////////////////////////////////////////// ///////////////////////////////////////////////
// Options //////////////////////////////////// // Options ////////////////////////////////////

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DG.Tweening.Core; using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using UnityEngine; using UnityEngine;
namespace DG.Tweening.Plugins.Core namespace DG.Tweening.Plugins.Core
@ -102,37 +103,53 @@ namespace DG.Tweening.Plugins.Core
if (plugin != null) { if (plugin != null) {
Debug.Log("PLUGIN FOUND, trying to assign it correctly..."); Debug.Log("PLUGIN FOUND, trying to assign it correctly...");
ABSTweenPlugin<T1, T2, TPlugOptions> p; ABSTweenPlugin<T1, T2, TPlugOptions> p;
ABSTweenPlugin<Vector3, Vector3, VectorOptions> pExplicit;
// Explicit casting to Vector3Plugin
try {
pExplicit = (ABSTweenPlugin<Vector3, Vector3, VectorOptions>)plugin;
if (pExplicit != null) Debug.Log("- EXPLICIT CAST SUCCESS X");
p = pExplicit as ABSTweenPlugin<T1, T2, TPlugOptions>;
if (p != null) {
Debug.Log("- PLUGIN SUCCESS X");
return p;
}
} catch (Exception e) {
Debug.Log("- PLUGIN FAIL X > " + e.Message);
}
// More regular ways
try { try {
p = plugin as ABSTweenPlugin<T1, T2, TPlugOptions>; p = plugin as ABSTweenPlugin<T1, T2, TPlugOptions>;
if (p != null) { if (p != null) {
Debug.Log("PLUGIN SUCCESS A"); Debug.Log("- PLUGIN SUCCESS A");
return p; return p;
} }
} catch (Exception e) { } catch (Exception e) {
Debug.Log("PLUGIN FAIL A > " + e.Message); Debug.Log("- PLUGIN FAIL A > " + e.Message);
} }
try { try {
p = (object)plugin as ABSTweenPlugin<T1, T2, TPlugOptions>; System.Object obj = (object)plugin;
p = obj as ABSTweenPlugin<T1, T2, TPlugOptions>;
if (p != null) { if (p != null) {
Debug.Log("PLUGIN SUCCESS A2"); Debug.Log("- PLUGIN SUCCESS A2");
return p; return p;
} }
} catch (Exception e) { } catch (Exception e) {
Debug.Log("PLUGIN FAIL A2 > " + e.Message); Debug.Log("- PLUGIN FAIL A2 > " + e.Message);
} }
try { try {
p = (ABSTweenPlugin<T1, T2, TPlugOptions>)plugin; p = (ABSTweenPlugin<T1, T2, TPlugOptions>)plugin;
Debug.Log("PLUGIN SUCCESS B"); Debug.Log("- PLUGIN SUCCESS B");
return p; return p;
} catch (Exception e) { } catch (Exception e) {
Debug.Log("PLUGIN FAIL B > " + e.Message); Debug.Log("- PLUGIN FAIL B > " + e.Message);
} }
try { try {
p = (ABSTweenPlugin<T1, T2, TPlugOptions>)(object)plugin; System.Object obj = (object)plugin;
Debug.Log("PLUGIN SUCCESS B2"); p = (ABSTweenPlugin<T1, T2, TPlugOptions>)obj;
Debug.Log("- PLUGIN SUCCESS B2");
return p; return p;
} catch (Exception e) { } catch (Exception e) {
Debug.Log("PLUGIN FAIL B2 > " + e.Message); Debug.Log("- PLUGIN FAIL B2 > " + e.Message);
} }
return null; return null;
} }

View File

@ -92,7 +92,8 @@ namespace DG.Tweening
if (iplug != null) { if (iplug != null) {
Debug.Log(">> IPlugin found"); Debug.Log(">> IPlugin found");
try { try {
t.tweenPlugin = (ABSTweenPlugin<T1, T2, TPlugOptions>)(object)iplug; System.Object pObj = (object)iplug;
t.tweenPlugin = (ABSTweenPlugin<T1, T2, TPlugOptions>)pObj;
} catch (Exception e) { } catch (Exception e) {
Debug.Log(">> Error while assigning IPlugin > " + e.Message); Debug.Log(">> Error while assigning IPlugin > " + e.Message);
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.