Installed Surge, fixed compile errors, moved a bunch of external stuff into folder
This commit is contained in:
9
Assets/External/Pixelplacement/Surge/Tween/Helpers.meta
vendored
Normal file
9
Assets/External/Pixelplacement/Surge/Tween/Helpers.meta
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3fadf06626664b0191bb66f126e4b03
|
||||
folderAsset: yes
|
||||
timeCreated: 1500598980
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
273
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenBase.cs
vendored
Normal file
273
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenBase.cs
vendored
Normal file
@@ -0,0 +1,273 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
///
|
||||
/// Base class for tweens.
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
#pragma warning disable 0168
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
public abstract class TweenBase
|
||||
{
|
||||
//Public Variables:
|
||||
public int targetInstanceID;
|
||||
public Tween.TweenType tweenType;
|
||||
|
||||
//Public Properties:
|
||||
public Tween.TweenStatus Status {get; private set;}
|
||||
public float Duration {get; private set;}
|
||||
public AnimationCurve Curve {get; private set;}
|
||||
public Keyframe[] CurveKeys { get; private set; }
|
||||
public bool ObeyTimescale {get; private set;}
|
||||
public Action StartCallback {get; private set;}
|
||||
public Action CompleteCallback {get; private set;}
|
||||
public float Delay {get; private set;}
|
||||
public Tween.LoopType LoopType {get; private set;}
|
||||
public float Percentage {get; private set; }
|
||||
|
||||
//Protected Variables:
|
||||
protected float elapsedTime = 0.0f;
|
||||
|
||||
//Public Methods:
|
||||
/// <summary>
|
||||
/// Stop/pauses the tween.
|
||||
/// </summary>
|
||||
public void Stop ()
|
||||
{
|
||||
Status = Tween.TweenStatus.Stopped;
|
||||
Tick ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts or restarts a tween - interrupts a delay and allows a canceled or finished tween to restart.
|
||||
/// </summary>
|
||||
public void Start ()
|
||||
{
|
||||
elapsedTime = 0.0f;
|
||||
|
||||
if (Status == Tween.TweenStatus.Canceled || Status == Tween.TweenStatus.Finished || Status == Tween.TweenStatus.Stopped)
|
||||
{
|
||||
Status = Tween.TweenStatus.Running;
|
||||
Operation (0);
|
||||
Tween.Instance.ExecuteTween (this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resumes a stopped/paused tween.
|
||||
/// </summary>
|
||||
public void Resume()
|
||||
{
|
||||
if (Status != Tween.TweenStatus.Stopped) return;
|
||||
|
||||
if (Status == Tween.TweenStatus.Stopped)
|
||||
{
|
||||
Status = Tween.TweenStatus.Running;
|
||||
Tween.Instance.ExecuteTween(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewind the tween.
|
||||
/// </summary>
|
||||
public void Rewind ()
|
||||
{
|
||||
Cancel ();
|
||||
Operation (0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewind the tween and stop.
|
||||
/// </summary>
|
||||
public void Cancel ()
|
||||
{
|
||||
Status = Tween.TweenStatus.Canceled;
|
||||
Tick ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fast forward the tween and stop.
|
||||
/// </summary>
|
||||
public void Finish ()
|
||||
{
|
||||
Status = Tween.TweenStatus.Finished;
|
||||
Tick ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used internally to update the tween and report status to the main system.
|
||||
/// </summary>
|
||||
public void Tick ()
|
||||
{
|
||||
//stop where we are:
|
||||
if (Status == Tween.TweenStatus.Stopped)
|
||||
{
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
|
||||
//rewind operation and stop:
|
||||
if (Status == Tween.TweenStatus.Canceled)
|
||||
{
|
||||
Operation (0);
|
||||
Percentage = 0;
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
|
||||
//fast forward operation and stop:
|
||||
if (Status == Tween.TweenStatus.Finished)
|
||||
{
|
||||
Operation (1);
|
||||
Percentage = 1;
|
||||
if (CompleteCallback != null) CompleteCallback ();
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
|
||||
float progress = 0.0f;
|
||||
|
||||
//calculate:
|
||||
if (ObeyTimescale)
|
||||
{
|
||||
elapsedTime += Time.deltaTime;
|
||||
}else{
|
||||
elapsedTime += Time.unscaledDeltaTime;
|
||||
}
|
||||
progress = Math.Max(elapsedTime, 0f);
|
||||
|
||||
//percentage:
|
||||
float percentage = Mathf.Min(progress / Duration, 1);
|
||||
|
||||
//delayed?
|
||||
if (percentage == 0 && Status != Tween.TweenStatus.Delayed) Status = Tween.TweenStatus.Delayed;
|
||||
|
||||
//running?
|
||||
if (percentage > 0 && Status == Tween.TweenStatus.Delayed)
|
||||
{
|
||||
if (SetStartValue ())
|
||||
{
|
||||
if (StartCallback != null) StartCallback ();
|
||||
Status = Tween.TweenStatus.Running;
|
||||
}else{
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//evaluate:
|
||||
float curveValue = percentage;
|
||||
|
||||
//using a curve?
|
||||
if (Curve != null && CurveKeys.Length > 0) curveValue = TweenUtilities.EvaluateCurve (Curve, percentage);
|
||||
|
||||
//perform operation with minimal overhead of a try/catch to account for anything that has been destroyed while tweening:
|
||||
if (Status == Tween.TweenStatus.Running)
|
||||
{
|
||||
try {
|
||||
Operation (curveValue);
|
||||
Percentage = curveValue;
|
||||
} catch (Exception ex) {
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//tween complete:
|
||||
if (percentage == 1)
|
||||
{
|
||||
if (CompleteCallback != null)
|
||||
{
|
||||
CompleteCallback();
|
||||
}
|
||||
|
||||
switch (LoopType)
|
||||
{
|
||||
case Tween.LoopType.Loop:
|
||||
Loop ();
|
||||
break;
|
||||
|
||||
case Tween.LoopType.PingPong:
|
||||
PingPong ();
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = Tween.TweenStatus.Finished;
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Private Methods:
|
||||
private void CleanUp()
|
||||
{
|
||||
if (Tween.activeTweens.Contains(this))
|
||||
{
|
||||
Tween.activeTweens.Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
//Protected Methods:
|
||||
/// <summary>
|
||||
/// Resets the start time.
|
||||
/// </summary>
|
||||
protected void ResetStartTime ()
|
||||
{
|
||||
elapsedTime = -Delay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the essential properties that all tweens need and should be called from their constructor. If targetInstanceID is -1 then this tween won't interrupt tweens of the same type on the same target.
|
||||
/// </summary>
|
||||
protected void SetEssentials (Tween.TweenType tweenType, int targetInstanceID, float duration, float delay, bool obeyTimeScale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
this.tweenType = tweenType;
|
||||
this.targetInstanceID = targetInstanceID;
|
||||
|
||||
if (delay > 0)
|
||||
Status = Tween.TweenStatus.Delayed;
|
||||
|
||||
Duration = duration;
|
||||
Delay = delay;
|
||||
Curve = curve;
|
||||
|
||||
CurveKeys = curve == null ? null : curve.keys;
|
||||
StartCallback = startCallback;
|
||||
CompleteCallback = completeCallback;
|
||||
LoopType = loop;
|
||||
ObeyTimescale = obeyTimeScale;
|
||||
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
//Abstract Methods:
|
||||
/// <summary>
|
||||
/// Override this method to carry out the initialization required for the tween.
|
||||
/// </summary>
|
||||
protected abstract bool SetStartValue ();
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to carry out the processing required for the tween.
|
||||
/// </summary>
|
||||
protected abstract void Operation (float percentage);
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to carry out a standard loop.
|
||||
/// </summary>
|
||||
public abstract void Loop ();
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to carry out a ping pong loop.
|
||||
/// </summary>
|
||||
public abstract void PingPong ();
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenBase.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenBase.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cc92aa32653c5c49961cb6ef1a155f4
|
||||
timeCreated: 1550029582
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/Helpers/TweenBase.cs
|
||||
uploadId: 467433
|
||||
39
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenEngine.cs
vendored
Normal file
39
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenEngine.cs
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
///
|
||||
/// Used internally by the tween system to run all tween calculations.
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
public class TweenEngine : MonoBehaviour
|
||||
{
|
||||
public void ExecuteTween(TweenBase tween)
|
||||
{
|
||||
Tween.activeTweens.Add(tween);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
foreach (var tween in Tween.activeTweens.ToArray())
|
||||
{
|
||||
tween.Tick();
|
||||
}
|
||||
|
||||
// for (int i = Tween.activeTweens.Count - 1; i >= 0; i--)
|
||||
// {
|
||||
// if (!Tween.activeTweens[i].Tick())
|
||||
// {
|
||||
// Tween.activeTweens.RemoveAt(i);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenEngine.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenEngine.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b13dfb4f9630436a8a99ed556dd04da
|
||||
timeCreated: 1462246277
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/Helpers/TweenEngine.cs
|
||||
uploadId: 467433
|
||||
123
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenUtilities.cs
vendored
Normal file
123
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenUtilities.cs
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
///
|
||||
/// Math helpers for interpolation and curve evaluation.
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
public class TweenUtilities : MonoBehaviour
|
||||
{
|
||||
//Public Methods:
|
||||
/// <summary>
|
||||
/// Generates the code to contain an Animation Curve in a property for use in storing ease curves within the Tween engine class.
|
||||
/// </summary>
|
||||
public static void GenerateAnimationCurvePropertyCode (AnimationCurve curve)
|
||||
{
|
||||
string code = "get { return new AnimationCurve (";
|
||||
for (int i = 0; i < curve.keys.Length; i++)
|
||||
{
|
||||
Keyframe currentFrame = curve.keys [i];
|
||||
code += "new Keyframe (" + currentFrame.time + "f, " + currentFrame.value + "f, " + currentFrame.inTangent + "f, " + currentFrame.outTangent + "f)";
|
||||
if (i < curve.keys.Length - 1) code += ", ";
|
||||
}
|
||||
code += "); }";
|
||||
|
||||
Debug.Log (code);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for float.
|
||||
/// </summary>
|
||||
public static float LinearInterpolate (float from, float to, float percentage)
|
||||
{
|
||||
return (to - from) * percentage + from; //this approach is needed instead of a simple Mathf.Lerp to accommodate ease cuves that overshoot
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for Vector2.
|
||||
/// </summary>
|
||||
public static Vector2 LinearInterpolate (Vector2 from, Vector2 to, float percentage)
|
||||
{
|
||||
return new Vector2 (LinearInterpolate (from.x, to.x, percentage), LinearInterpolate (from.y, to.y, percentage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for Vector3.
|
||||
/// </summary>
|
||||
public static Vector3 LinearInterpolate (Vector3 from, Vector3 to, float percentage)
|
||||
{
|
||||
return new Vector3 (LinearInterpolate (from.x, to.x, percentage), LinearInterpolate (from.y, to.y, percentage), LinearInterpolate (from.z, to.z, percentage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for Rotations.
|
||||
/// </summary>
|
||||
public static Vector3 LinearInterpolateRotational (Vector3 from, Vector3 to, float percentage)
|
||||
{
|
||||
return new Vector3 (CylindricalLerp (from.x, to.x, percentage), CylindricalLerp (from.y, to.y, percentage), CylindricalLerp (from.z, to.z, percentage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for Vector4.
|
||||
/// </summary>
|
||||
public static Vector4 LinearInterpolate (Vector4 from, Vector4 to, float percentage)
|
||||
{
|
||||
return new Vector4 (LinearInterpolate (from.x, to.x, percentage), LinearInterpolate (from.y, to.y, percentage), LinearInterpolate (from.z, to.z, percentage), LinearInterpolate (from.w, to.w, percentage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for Rect.
|
||||
/// </summary>
|
||||
public static Rect LinearInterpolate (Rect from, Rect to, float percentage)
|
||||
{
|
||||
return new Rect (LinearInterpolate (from.x, to.x, percentage), LinearInterpolate (from.y, to.y, percentage), LinearInterpolate (from.width, to.width, percentage), LinearInterpolate (from.height, to.height, percentage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Linear interpolation for Color.
|
||||
/// </summary>
|
||||
public static Color LinearInterpolate (Color from, Color to, float percentage)
|
||||
{
|
||||
return new Color (LinearInterpolate (from.r, to.r, percentage), LinearInterpolate (from.g, to.g, percentage), LinearInterpolate (from.b, to.b, percentage), LinearInterpolate (from.a, to.a, percentage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Evaluates a curve at a percentage.
|
||||
/// </summary>
|
||||
public static float EvaluateCurve (AnimationCurve curve, float percentage)
|
||||
{
|
||||
return curve.Evaluate ((curve [curve.length - 1].time) * percentage);
|
||||
}
|
||||
|
||||
//Private Methods:
|
||||
//use to handle rotational lerping so values that wrap around 360 don't spin in the wrong direction:
|
||||
static float CylindricalLerp (float from, float to, float percentage)
|
||||
{
|
||||
float min = 0f;
|
||||
float max = 360f;
|
||||
float half = Mathf.Abs ((max - min) * .5f);
|
||||
float calculation = 0f;
|
||||
float difference = 0f;
|
||||
|
||||
if ((to - from) < -half)
|
||||
{
|
||||
difference = ((max - from) + to) * percentage;
|
||||
calculation = from + difference;
|
||||
}else if ((to - from) > half){
|
||||
difference = -((max - to) + from) * percentage;
|
||||
calculation = from + difference;
|
||||
}else{
|
||||
calculation = from + (to - from) * percentage;
|
||||
}
|
||||
|
||||
return calculation;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenUtilities.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/Helpers/TweenUtilities.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04a591ac6904e4a5b851e2a29c607e76
|
||||
timeCreated: 1460088213
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/Helpers/TweenUtilities.cs
|
||||
uploadId: 467433
|
||||
978
Assets/External/Pixelplacement/Surge/Tween/Tween.cs
vendored
Normal file
978
Assets/External/Pixelplacement/Surge/Tween/Tween.cs
vendored
Normal file
@@ -0,0 +1,978 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
///
|
||||
/// Tween singleton and execution engine.
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Pixelplacement
|
||||
{
|
||||
public class Tween
|
||||
{
|
||||
/// <summary>
|
||||
/// Used internally to identify the type of tween to carry out.
|
||||
/// </summary>
|
||||
public enum TweenType { Position, Rotation, LocalScale, LightColor, CameraBackgroundColor, LightIntensity, LightRange, FieldOfView, SpriteRendererColor, GraphicColor, AnchoredPosition, Size, Volume, Pitch, PanStereo, ShaderFloat, ShaderColor, ShaderInt, ShaderVector, Value, CanvasGroupAlpha, Spline, TextColor, ImageColor, RawImageColor, TextMeshColor };
|
||||
|
||||
/// <summary>
|
||||
/// What style of loop, if any, should be applied to this tween.
|
||||
/// </summary>
|
||||
public enum LoopType { None, Loop, PingPong };
|
||||
|
||||
/// <summary>
|
||||
/// Used internally to identify the status of tween.
|
||||
/// </summary>
|
||||
public enum TweenStatus { Delayed, Running, Canceled, Stopped, Finished }
|
||||
|
||||
//Public Properties:
|
||||
public static TweenSystem.TweenEngine Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null) _instance = new GameObject("(Tween Engine)", typeof(TweenSystem.TweenEngine)).GetComponent<TweenSystem.TweenEngine>();
|
||||
GameObject.DontDestroyOnLoad(_instance.gameObject);
|
||||
//_instance.gameObject.hideFlags = HideFlags.HideInHierarchy;
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
//Public Variables:
|
||||
public static List<TweenSystem.TweenBase> activeTweens = new List<TweenSystem.TweenBase>();
|
||||
|
||||
//Private Variables:
|
||||
private static TweenSystem.TweenEngine _instance;
|
||||
private static AnimationCurve _easeIn;
|
||||
private static AnimationCurve _easeInStrong;
|
||||
private static AnimationCurve _easeOut;
|
||||
private static AnimationCurve _easeOutStrong;
|
||||
private static AnimationCurve _easeInOut;
|
||||
private static AnimationCurve _easeInOutStrong;
|
||||
private static AnimationCurve _easeInBack;
|
||||
private static AnimationCurve _easeOutBack;
|
||||
private static AnimationCurve _easeInOutBack;
|
||||
private static AnimationCurve _easeSpring;
|
||||
private static AnimationCurve _easeBounce;
|
||||
private static AnimationCurve _easeWobble;
|
||||
|
||||
//Public Methods:
|
||||
//tween callers:
|
||||
/// <summary>
|
||||
/// Shakes a Transform by a diminishing amount.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Shake(Transform target, Vector3 initialPosition, Vector3 intensity, float duration, float delay, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ShakePosition tween = new TweenSystem.ShakePosition(target, initialPosition, intensity, duration, delay, EaseLinear, startCallback, completeCallback, loop, obeyTimescale);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves a Transform along a spline path from a start percentage to an end percentage.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Spline(Spline spline, Transform target, float startPercentage, float endPercentage, bool faceDirection, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.SplinePercentage tween = new TweenSystem.SplinePercentage(spline, target, startPercentage, endPercentage, faceDirection, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the alpha of a Canvas object.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase CanvasGroupAlpha(CanvasGroup target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.CanvasGroupAlpha tween = new TweenSystem.CanvasGroupAlpha(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the alpha of a Canvas object.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase CanvasGroupAlpha(CanvasGroup target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.alpha = startValue;
|
||||
return CanvasGroupAlpha(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a Rect to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(Rect startValue, Rect endValue, Action<Rect> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueRect tween = new TweenSystem.ValueRect(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a Vector4 to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(Vector4 startValue, Vector4 endValue, Action<Vector4> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueVector4 tween = new TweenSystem.ValueVector4(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a Vector3 to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(Vector3 startValue, Vector3 endValue, Action<Vector3> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueVector3 tween = new TweenSystem.ValueVector3(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a Vector2 to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(Vector2 startValue, Vector2 endValue, Action<Vector2> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueVector2 tween = new TweenSystem.ValueVector2(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a color to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(Color startValue, Color endValue, Action<Color> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueColor tween = new TweenSystem.ValueColor(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an int to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(int startValue, int endValue, Action<int> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueInt tween = new TweenSystem.ValueInt(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a float to a callback method as it tweens from a start to an end value. Note that Value tweens do not interrupt currently running Value tweens of the same type - catalog a reference by setting your tween to a Tweenbase variable so you can interrupt as needed.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Value(float startValue, float endValue, Action<float> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ValueFloat tween = new TweenSystem.ValueFloat(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named vector property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderVector(Material target, string propertyName, Vector4 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ShaderVector tween = new TweenSystem.ShaderVector(target, propertyName, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named vector property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderVector(Material target, string propertyName, Vector4 startValue, Vector4 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.SetVector(propertyName, startValue);
|
||||
return ShaderVector(target, propertyName, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named int property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderInt(Material target, string propertyName, int endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ShaderInt tween = new TweenSystem.ShaderInt(target, propertyName, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named int property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderInt(Material target, string propertyName, int startValue, int endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.SetInt(propertyName, startValue);
|
||||
return ShaderInt(target, propertyName, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named color property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderColor(Material target, string propertyName, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ShaderColor tween = new TweenSystem.ShaderColor(target, propertyName, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named color property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderColor(Material target, string propertyName, Color startValue, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.SetColor(propertyName, startValue);
|
||||
return ShaderColor(target, propertyName, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named float property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderFloat(Material target, string propertyName, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ShaderFloat tween = new TweenSystem.ShaderFloat(target, propertyName, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the named float property of a Material's shader.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase ShaderFloat(Material target, string propertyName, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.SetFloat(propertyName, startValue);
|
||||
return ShaderFloat(target, propertyName, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the pitch of an AudioSource.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Pitch(AudioSource target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.Pitch tween = new TweenSystem.Pitch(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the pitch of an AudioSource.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Pitch(AudioSource target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.pitch = startValue;
|
||||
return Pitch(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the stereo pan of an AudioSource.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase PanStereo(AudioSource target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.PanStereo tween = new TweenSystem.PanStereo(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the stereo pan of an AudioSource.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase PanStereo(AudioSource target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.panStereo = startValue;
|
||||
return PanStereo(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the volume of an AudioSource.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Volume(AudioSource target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.Volume tween = new TweenSystem.Volume(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the volume of an AudioSource.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Volume(AudioSource target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.volume = startValue;
|
||||
return Volume(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the width and height of a RectTransform.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Size(RectTransform target, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.Size tween = new TweenSystem.Size(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the width and height of a RectTransform.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Size(RectTransform target, Vector2 startValue, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.sizeDelta = startValue;
|
||||
return Size(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the field of view (FOV) of a camera.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase FieldOfView(Camera target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.FieldOfView tween = new TweenSystem.FieldOfView(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the field of view (FOV) of a camera.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase FieldOfView(Camera target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.fieldOfView = startValue;
|
||||
return FieldOfView(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the range of a light.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LightRange(Light target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.LightRange tween = new TweenSystem.LightRange(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the range of a light.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LightRange(Light target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.range = startValue;
|
||||
return LightRange(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the intensity of a light.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LightIntensity(Light target, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.LightIntensity tween = new TweenSystem.LightIntensity(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the intensity of a light.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LightIntensity(Light target, float startValue, float endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.intensity = startValue;
|
||||
return LightIntensity(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scales a Transform.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalScale(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.LocalScale tween = new TweenSystem.LocalScale(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scales a Transform.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalScale(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.localScale = startValue;
|
||||
return LocalScale(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of graphic.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Graphic target, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.GraphicColor tween = new TweenSystem.GraphicColor(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a graphic.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Graphic target, Color startValue, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.color = startValue;
|
||||
return Color(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a light.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Light target, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.LightColor tween = new TweenSystem.LightColor(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a light.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Light target, Color startValue, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.color = startValue;
|
||||
return Color(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a Material's "_Color" propery (for property name access see ShaderColor instead).
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Material target, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.ShaderColor tween = new TweenSystem.ShaderColor(target, "_Color", endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a Material's "_Color" propery (for property name access see ShaderColor instead).
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Material target, Color startColor, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.color = startColor;
|
||||
return Color(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a Renderer's material "_Color" propery (for property name access see ShaderColor instead).
|
||||
/// This version is a wrapper for the color tween that targets a material.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Renderer target, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
Material material = target.material;
|
||||
return Color(material, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a Renderer's material propery (for property name access see ShaderColor instead).
|
||||
/// This version is a wrapper for the color tween that targets a material.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Renderer target, Color startColor, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
Material material = target.material;
|
||||
return Color(material, startColor, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a SpriteRenderer.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(SpriteRenderer target, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.SpriteRendererColor tween = new TweenSystem.SpriteRendererColor(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a SpriteRenderer.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(SpriteRenderer target, Color startColor, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.color = startColor;
|
||||
return Color(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a Camera's background.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Camera target, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.CameraBackgroundColor tween = new TweenSystem.CameraBackgroundColor(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the color of a Camera's background.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Color(Camera target, Color startColor, Color endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.backgroundColor = startColor;
|
||||
return Color(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the Transform of a GameObject in world coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Position(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.Position tween = new TweenSystem.Position(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the Transform of a GameObject in world coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Position(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.position = startValue;
|
||||
return Position(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves a RectTransform relative to it's reference anchor.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase AnchoredPosition(RectTransform target, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.AnchoredPosition tween = new TweenSystem.AnchoredPosition(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves a RectTransform relative to it's reference anchor.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase AnchoredPosition(RectTransform target, Vector2 startValue, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.anchoredPosition = startValue;
|
||||
return AnchoredPosition(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the Transform of a GameObject in local coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalPosition(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.LocalPosition tween = new TweenSystem.LocalPosition(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the Transform of a GameObject in local coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalPosition(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.localPosition = startValue;
|
||||
return LocalPosition(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject by a Vector3 amount. This is different from Rotation and LocalRotation in that it does not set the rotation it rotates by the supplied amount.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Rotate(Transform target, Vector3 amount, Space space, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.Rotate tween = new TweenSystem.Rotate(target, amount, space, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Vector3 destination in world coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Rotation(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
endValue = Quaternion.Euler(endValue).eulerAngles;
|
||||
TweenSystem.Rotation tween = new TweenSystem.Rotation(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Vector3 destination in world coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Rotation(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
startValue = Quaternion.Euler(startValue).eulerAngles;
|
||||
endValue = Quaternion.Euler(endValue).eulerAngles;
|
||||
target.rotation = Quaternion.Euler(startValue);
|
||||
return Rotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Quaternion destination in world coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Rotation(Transform target, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.Rotation tween = new TweenSystem.Rotation(target, endValue.eulerAngles, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Quaternion destination in world coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase Rotation(Transform target, Quaternion startValue, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.rotation = startValue;
|
||||
return Rotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Vector3 destination in local coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalRotation(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
endValue = Quaternion.Euler(endValue).eulerAngles;
|
||||
TweenSystem.LocalRotation tween = new TweenSystem.LocalRotation(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Vector3 destination in local coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalRotation(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
startValue = Quaternion.Euler(startValue).eulerAngles;
|
||||
endValue = Quaternion.Euler(endValue).eulerAngles;
|
||||
target.localRotation = Quaternion.Euler(startValue);
|
||||
return LocalRotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Quaternion destination in local coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalRotation(Transform target, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
TweenSystem.LocalRotation tween = new TweenSystem.LocalRotation(target, endValue.eulerAngles, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
|
||||
SendTweenForProcessing(tween, true);
|
||||
return tween;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the Transform of a GameObject with a Quaternion destination in local coordinates.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LocalRotation(Transform target, Quaternion startValue, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
target.localRotation = startValue;
|
||||
return LocalRotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates a LookAt operation towards a Transform.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LookAt(Transform target, Transform targetToLookAt, Vector3 up, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
Vector3 direction = targetToLookAt.position - target.position;
|
||||
Quaternion rotation = Quaternion.LookRotation(direction, up);
|
||||
return Rotation(target, rotation, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotates a LookAt operation towards a Vector3.
|
||||
/// </summary>
|
||||
public static TweenSystem.TweenBase LookAt(Transform target, Vector3 positionToLookAt, Vector3 up, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
|
||||
{
|
||||
Vector3 direction = positionToLookAt - target.position;
|
||||
Quaternion rotation = Quaternion.LookRotation(direction, up);
|
||||
return Rotation(target, rotation, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
|
||||
}
|
||||
|
||||
//utilities:
|
||||
|
||||
/// <summary>
|
||||
/// Stop a specific type of tween on a target. Use GetInstanceID() of your target for this method.
|
||||
/// </summary>
|
||||
public static void Stop(int targetInstanceID, TweenType tweenType)
|
||||
{
|
||||
if (targetInstanceID == -1) return;
|
||||
for (int i = 0; i < activeTweens.Count; i++)
|
||||
{
|
||||
if (activeTweens[i].targetInstanceID == targetInstanceID && activeTweens[i].tweenType == tweenType && activeTweens[i].Status != TweenStatus.Delayed)
|
||||
{
|
||||
activeTweens[i].Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop all tweens on a target. Use GetInstanceID() of your target for this method.
|
||||
/// </summary>
|
||||
public static void Stop(int targetInstanceID)
|
||||
{
|
||||
StopInstanceTarget(targetInstanceID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops all tweens.
|
||||
/// </summary>
|
||||
public static void StopAll()
|
||||
{
|
||||
foreach (TweenSystem.TweenBase item in activeTweens)
|
||||
{
|
||||
item.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finishes all tweens - sets them to their final value and stops them.
|
||||
/// </summary>
|
||||
public static void FinishAll()
|
||||
{
|
||||
foreach (TweenSystem.TweenBase item in activeTweens)
|
||||
{
|
||||
item.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finishes a tween. Sets it to final value and stops it.
|
||||
/// </summary>
|
||||
public static void Finish(int targetInstanceID)
|
||||
{
|
||||
FinishInstanceTarget(targetInstanceID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancels a tween - rewinds values to where they started and stops.
|
||||
/// </summary>
|
||||
public static void Cancel(int targetInstanceID)
|
||||
{
|
||||
CancelInstanceTarget(targetInstanceID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancels all tweens - rewinds their values to where they started and stops them.
|
||||
/// </summary>
|
||||
public static void CancelAll()
|
||||
{
|
||||
foreach (TweenSystem.TweenBase item in activeTweens)
|
||||
{
|
||||
item.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
//Public Properties - Ease Curves:
|
||||
/// <summary>
|
||||
/// A linear curve.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseLinear
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that runs slow in the beginning.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseIn
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeIn == null) _easeIn = new AnimationCurve(new Keyframe(0, 0, 0, 0), new Keyframe(1, 1, 1, 0));
|
||||
return _easeIn;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that runs slow in the beginning but with more overall energy.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseInStrong
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_easeInStrong == null) _easeInStrong = new AnimationCurve(new Keyframe(0, 0, .03f, .03f), new Keyframe(0.45f, 0.03f, 0.2333333f, 0.2333333f), new Keyframe(0.7f, 0.13f, 0.7666667f, 0.7666667f), new Keyframe(0.85f, 0.3f, 2.233334f, 2.233334f), new Keyframe(0.925f, 0.55f, 4.666665f, 4.666665f), new Keyframe(1, 1, 5.999996f, 5.999996f));
|
||||
return _easeInStrong;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that runs slow at the end.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseOut
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_easeOut == null) _easeOut = new AnimationCurve(new Keyframe(0, 0, 0, 1), new Keyframe(1, 1, 0, 0));
|
||||
return _easeOut;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that runs slow at the end but with more overall energy.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseOutStrong
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeOutStrong == null) _easeOutStrong = new AnimationCurve(new Keyframe(0, 0, 13.80198f, 13.80198f), new Keyframe(0.04670785f, 0.3973127f, 5.873408f, 5.873408f), new Keyframe(0.1421811f, 0.7066917f, 2.313627f, 2.313627f), new Keyframe(0.2483539f, 0.8539293f, 0.9141542f, 0.9141542f), new Keyframe(0.4751028f, 0.954047f, 0.264541f, 0.264541f), new Keyframe(1, 1, .03f, .03f));
|
||||
return _easeOutStrong;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that runs slow in the beginning and at the end.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseInOut
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeInOut == null) _easeInOut = AnimationCurve.EaseInOut(0, 0, 1, 1);
|
||||
return _easeInOut;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that runs slow in the beginning and the end but with more overall energy.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseInOutStrong
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeInOutStrong == null) _easeInOutStrong = new AnimationCurve(new Keyframe(0, 0, 0.03f, 0.03f), new Keyframe(0.5f, 0.5f, 3.257158f, 3.257158f), new Keyframe(1, 1, .03f, .03f));
|
||||
return _easeInOutStrong;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that appears to "charge up" before it moves.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseInBack
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeInBack == null) _easeInBack = new AnimationCurve(new Keyframe(0, 0, -1.1095f, -1.1095f), new Keyframe(1, 1, 2, 2));
|
||||
return _easeInBack;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that shoots past its target and springs back into place.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseOutBack
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_easeOutBack == null) _easeOutBack = new AnimationCurve(new Keyframe(0, 0, 2, 2), new Keyframe(1, 1, -1.1095f, -1.1095f));
|
||||
return _easeOutBack;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that appears to "charge up" before it moves, shoots past its target and springs back into place.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseInOutBack
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeInOutBack == null) _easeInOutBack = new AnimationCurve(new Keyframe(1, 1, -1.754543f, -1.754543f), new Keyframe(0, 0, -1.754543f, -1.754543f));
|
||||
return _easeInOutBack;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that snaps to its value with a fun spring motion.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseSpring
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeSpring == null) _easeSpring = new AnimationCurve(new Keyframe(0f, -0.0003805831f, 8.990726f, 8.990726f), new Keyframe(0.35f, 1f, -4.303913f, -4.303913f), new Keyframe(0.55f, 1f, 1.554695f, 1.554695f), new Keyframe(0.7730452f, 1f, -2.007816f, -2.007816f), new Keyframe(1f, 1f, -1.23451f, -1.23451f));
|
||||
return _easeSpring;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that settles to its value with a fun bounce motion.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseBounce
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeBounce == null) _easeBounce = new AnimationCurve(new Keyframe(0, 0, 0, 0), new Keyframe(0.25f, 1, 11.73749f, -5.336508f), new Keyframe(0.4f, 0.6f, -0.1904764f, -0.1904764f), new Keyframe(0.575f, 1, 5.074602f, -3.89f), new Keyframe(0.7f, 0.75f, 0.001192093f, 0.001192093f), new Keyframe(0.825f, 1, 4.18469f, -2.657566f), new Keyframe(0.895f, 0.9f, 0, 0), new Keyframe(0.95f, 1, 3.196362f, -2.028364f), new Keyframe(1, 1, 2.258884f, 0.5f));
|
||||
return _easeBounce;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A curve that appears to apply a jolt that wobbles back down to where it was.
|
||||
/// </summary>
|
||||
public static AnimationCurve EaseWobble
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_easeWobble == null) _easeWobble = new AnimationCurve(new Keyframe(0f, 0f, 11.01978f, 30.76278f), new Keyframe(0.08054394f, 1f, 0f, 0f), new Keyframe(0.3153235f, -0.75f, 0f, 0f), new Keyframe(0.5614113f, 0.5f, 0f, 0f), new Keyframe(0.75f, -0.25f, 0f, 0f), new Keyframe(0.9086903f, 0.1361611f, 0f, 0f), new Keyframe(1f, 0f, -4.159244f, -1.351373f));
|
||||
return _easeWobble;
|
||||
}
|
||||
}
|
||||
|
||||
//Private Methods:
|
||||
static void StopInstanceTarget(int id)
|
||||
{
|
||||
for (int i = 0; i < activeTweens.Count; i++)
|
||||
{
|
||||
if (activeTweens[i].targetInstanceID == id)
|
||||
{
|
||||
activeTweens[i].Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void StopInstanceTargetType(int id, TweenType type)
|
||||
{
|
||||
for (int i = activeTweens.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (activeTweens[i].targetInstanceID == id && activeTweens[i].tweenType == type)
|
||||
{
|
||||
activeTweens[i].Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void FinishInstanceTarget(int id)
|
||||
{
|
||||
for (int i = activeTweens.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (activeTweens[i].targetInstanceID == id)
|
||||
{
|
||||
activeTweens[i].Finish();
|
||||
//activeTweens.RemoveAt(i); needs validation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void CancelInstanceTarget(int id)
|
||||
{
|
||||
for (int i = activeTweens.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (activeTweens[i].targetInstanceID == id)
|
||||
{
|
||||
activeTweens[i].Cancel();
|
||||
//activeTweens.RemoveAt(i); needs validation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void SendTweenForProcessing(TweenSystem.TweenBase tween, bool interrupt = false)
|
||||
{
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
//Tween can not be called in edit mode!
|
||||
return;
|
||||
}
|
||||
|
||||
if (interrupt && tween.Delay == 0)
|
||||
{
|
||||
StopInstanceTargetType(tween.targetInstanceID, tween.tweenType);
|
||||
}
|
||||
|
||||
Instance.ExecuteTween(tween);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/Tween.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/Tween.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b616ae856b5b94b2fa837a2ccadb60a8
|
||||
timeCreated: 1460088213
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/Tween.cs
|
||||
uploadId: 467433
|
||||
9
Assets/External/Pixelplacement/Surge/Tween/TweenActions.meta
vendored
Normal file
9
Assets/External/Pixelplacement/Surge/Tween/TweenActions.meta
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 367c0f1d1fe50478fa776978dced620e
|
||||
folderAsset: yes
|
||||
timeCreated: 1500598980
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/AnchoredPosition.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/AnchoredPosition.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class AnchoredPosition : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector2 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
RectTransform _target;
|
||||
Vector2 _start;
|
||||
|
||||
//Constructor:
|
||||
public AnchoredPosition (RectTransform target, Vector2 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.AnchoredPosition, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.anchoredPosition;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector3 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.anchoredPosition = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.anchoredPosition = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.anchoredPosition = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.anchoredPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/AnchoredPosition.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/AnchoredPosition.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20e66cb3d412943918c2d66035f839d3
|
||||
timeCreated: 1462329792
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/AnchoredPosition.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CameraBackgroundColor.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CameraBackgroundColor.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class CameraBackgroundColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue { get; private set; }
|
||||
|
||||
//Private Variables:
|
||||
Camera _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public CameraBackgroundColor(Camera target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials(Tween.TweenType.CameraBackgroundColor, target.GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.backgroundColor;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation(float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate(_start, EndValue, percentage);
|
||||
_target.backgroundColor = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop()
|
||||
{
|
||||
ResetStartTime();
|
||||
_target.backgroundColor = _start;
|
||||
}
|
||||
|
||||
public override void PingPong()
|
||||
{
|
||||
ResetStartTime();
|
||||
_target.backgroundColor = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.backgroundColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CameraBackgroundColor.cs.meta
vendored
Normal file
18
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CameraBackgroundColor.cs.meta
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfcb23c0aa6992546a027007b429ccc0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/CameraBackgroundColor.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CanvasGroupAlpha.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CanvasGroupAlpha.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class CanvasGroupAlpha : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
CanvasGroup _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public CanvasGroupAlpha (CanvasGroup target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.CanvasGroupAlpha, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.alpha;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.alpha = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.alpha = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.alpha = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.alpha;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CanvasGroupAlpha.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/CanvasGroupAlpha.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bafb4a5e6f61e4c6cb90b7e834e7d868
|
||||
timeCreated: 1470190873
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/CanvasGroupAlpha.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/FieldOfView.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/FieldOfView.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class FieldOfView : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Camera _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public FieldOfView (Camera target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.FieldOfView, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.fieldOfView;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.fieldOfView = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.fieldOfView = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.fieldOfView = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.fieldOfView;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/FieldOfView.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/FieldOfView.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7db1ff4ba46294da8adc0ce007f9dad4
|
||||
timeCreated: 1462160211
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/FieldOfView.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/GraphicColor.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/GraphicColor.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class GraphicColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Graphic _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public GraphicColor (Graphic target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.GraphicColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/GraphicColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/GraphicColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33140878b0dc143039c95a04978ed01b
|
||||
timeCreated: 1463587588
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/GraphicColor.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ImageColor.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ImageColor.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ImageColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Image _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public ImageColor (Image target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.ImageColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ImageColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ImageColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a89bfe1d7216a462093fe4bcf015e416
|
||||
timeCreated: 1462328844
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ImageColor.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightColor.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightColor.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class LightColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Light _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public LightColor (Light target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.LightColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bbe4f845ba164500b197be055dd270a
|
||||
timeCreated: 1462156703
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/LightColor.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightIntensity.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightIntensity.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class LightIntensity : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Light _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public LightIntensity (Light target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.LightIntensity, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.intensity;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.intensity = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.intensity = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.intensity = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.intensity;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightIntensity.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightIntensity.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04637c6205ae943a78105cd60d145990
|
||||
timeCreated: 1462157631
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/LightIntensity.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightRange.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightRange.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class LightRange : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Light _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public LightRange (Light target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.LightRange, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.range;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.range = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.range = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.range = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.range;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightRange.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LightRange.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 521112d1c772e489baa895af94afc204
|
||||
timeCreated: 1462158362
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/LightRange.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalPosition.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalPosition.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class LocalPosition : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _start;
|
||||
|
||||
//Constructor:
|
||||
public LocalPosition (Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Position, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.localPosition;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector3 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.localPosition = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localPosition = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localPosition = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.localPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalPosition.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalPosition.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fffdfb87fcbf340979a1b721864cc09a
|
||||
timeCreated: 1461961385
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/LocalPosition.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalRotation.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalRotation.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class LocalRotation : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _start;
|
||||
|
||||
//Constructor:
|
||||
public LocalRotation (Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Rotation, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.localEulerAngles;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
//Quaternion calculatedValue = Quaternion.Euler (TweenUtilities.LinearInterpolateRotational (_start, EndValue, percentage));
|
||||
Quaternion calculatedValue = Quaternion.LerpUnclamped(Quaternion.Euler(_start), Quaternion.Euler(EndValue), percentage);
|
||||
_target.localRotation = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localEulerAngles = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localEulerAngles = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.localEulerAngles;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalRotation.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalRotation.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53578f4e4be6a41c2a67e381469519be
|
||||
timeCreated: 1461961681
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/LocalRotation.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalScale.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalScale.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class LocalScale : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _start;
|
||||
|
||||
//Constructor:
|
||||
public LocalScale (Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.LocalScale, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.localScale;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector3 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.localScale = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localScale = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localScale = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.localScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalScale.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/LocalScale.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5265e946712d749fe9efce9965cbf399
|
||||
timeCreated: 1462155317
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/LocalScale.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/PanStereo.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/PanStereo.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class PanStereo : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
AudioSource _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public PanStereo (AudioSource target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.PanStereo, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.panStereo;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.panStereo = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.panStereo = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.panStereo = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.panStereo;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/PanStereo.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/PanStereo.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4bdd872f9ef84ad7a41c267fc22f75f
|
||||
timeCreated: 1462335699
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/PanStereo.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Pitch.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Pitch.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class Pitch : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
AudioSource _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public Pitch (AudioSource target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Pitch, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.pitch;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.pitch = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.pitch = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.pitch = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.pitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Pitch.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Pitch.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54b1aeb47e4614cc1ab0f48c89396dae
|
||||
timeCreated: 1462337939
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/Pitch.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Position.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Position.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class Position : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _start;
|
||||
|
||||
//Constructor:
|
||||
public Position (Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Position, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Operation:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.position;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector3 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.position = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.position = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.position = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Position.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Position.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cc438466c2aa4ceaaf965296fc65373
|
||||
timeCreated: 1460090129
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/Position.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/RawImageColor.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/RawImageColor.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class RawImageColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
RawImage _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public RawImageColor (RawImage target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.RawImageColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/RawImageColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/RawImageColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38add03cbbf4f4c21b43cbf684275d83
|
||||
timeCreated: 1463587588
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/RawImageColor.cs
|
||||
uploadId: 467433
|
||||
70
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotate.cs
vendored
Normal file
70
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotate.cs
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class Rotate : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _start;
|
||||
Space _space;
|
||||
Vector3 _previous;
|
||||
|
||||
//Constructor:
|
||||
public Rotate (Transform target, Vector3 endValue, Space space, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Rotation, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
_space = space;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.localEulerAngles;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
if (percentage == 0)
|
||||
{
|
||||
_target.localEulerAngles = _start;
|
||||
}
|
||||
Vector3 spinAmount = TweenUtilities.LinearInterpolate (Vector3.zero, EndValue, percentage);
|
||||
Vector3 spinDifference = spinAmount - _previous;
|
||||
_previous += spinDifference;
|
||||
_target.Rotate (spinDifference, _space);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
_previous = Vector3.zero;
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
_previous = Vector3.zero;
|
||||
EndValue *= -1;
|
||||
ResetStartTime ();
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotate.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotate.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f506ebf446fee3649a1df27bd1a97715
|
||||
timeCreated: 1486065326
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/Rotate.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotation.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotation.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class Rotation : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _start;
|
||||
|
||||
//Constructor:
|
||||
public Rotation (Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Rotation, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.eulerAngles;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Quaternion calculatedValue = Quaternion.Euler (TweenUtilities.LinearInterpolateRotational (_start, EndValue, percentage));
|
||||
_target.rotation = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.eulerAngles = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.eulerAngles = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.eulerAngles;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotation.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Rotation.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da2f88fb7e6ac4916a606a1d5d1f2bba
|
||||
timeCreated: 1460089138
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/Rotation.cs
|
||||
uploadId: 467433
|
||||
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderColor.cs
vendored
Normal file
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderColor.cs
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ShaderColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Material _target;
|
||||
Color _start;
|
||||
string _propertyName;
|
||||
|
||||
//Constructor:
|
||||
public ShaderColor (Material target, string propertyName, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.ShaderColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
_propertyName = propertyName;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
_start = _target.GetColor (_propertyName);
|
||||
if (_target == null) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.SetColor (_propertyName, calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetColor (_propertyName, _start);
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetColor (_propertyName, EndValue);
|
||||
EndValue = _start;
|
||||
_start = _target.GetColor (_propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6379b940180fa455ba9e81e4410502d9
|
||||
timeCreated: 1461771383
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ShaderColor.cs
|
||||
uploadId: 467433
|
||||
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderFloat.cs
vendored
Normal file
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderFloat.cs
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ShaderFloat : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Material _target;
|
||||
float _start;
|
||||
string _propertyName;
|
||||
|
||||
//Constructor:
|
||||
public ShaderFloat (Material target, string propertyName, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.ShaderFloat, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
_propertyName = propertyName;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
_start = _target.GetFloat (_propertyName);
|
||||
if (_target == null) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.SetFloat (_propertyName, calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetFloat (_propertyName, _start);
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetFloat (_propertyName, EndValue);
|
||||
EndValue = _start;
|
||||
_start = _target.GetFloat (_propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderFloat.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderFloat.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25c43d80349114d4ca708ebdcb90b9be
|
||||
timeCreated: 1462817277
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ShaderFloat.cs
|
||||
uploadId: 467433
|
||||
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderInt.cs
vendored
Normal file
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderInt.cs
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ShaderInt : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public int EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Material _target;
|
||||
int _start;
|
||||
string _propertyName;
|
||||
|
||||
//Constructor:
|
||||
public ShaderInt (Material target, string propertyName, int endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.ShaderInt, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
_propertyName = propertyName;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
_start = _target.GetInt (_propertyName);
|
||||
if (_target == null) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.SetInt (_propertyName, (int)calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetInt (_propertyName, _start);
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetInt (_propertyName, EndValue);
|
||||
EndValue = _start;
|
||||
_start = _target.GetInt (_propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderInt.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderInt.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbda9bdf0c8d34b7195835106c7b95de
|
||||
timeCreated: 1462818341
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ShaderInt.cs
|
||||
uploadId: 467433
|
||||
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderVector.cs
vendored
Normal file
64
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderVector.cs
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ShaderVector : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector4 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Material _target;
|
||||
Vector4 _start;
|
||||
string _propertyName;
|
||||
|
||||
//Constructor:
|
||||
public ShaderVector (Material target, string propertyName, Vector4 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.ShaderVector, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
_propertyName = propertyName;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.GetVector (_propertyName);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector4 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.SetVector (_propertyName, calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetVector (_propertyName, _start);
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.SetVector (_propertyName, EndValue);
|
||||
EndValue = _start;
|
||||
_start = _target.GetVector (_propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderVector.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShaderVector.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4210fe35824949d9a7305e89bc43632
|
||||
timeCreated: 1462818353
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ShaderVector.cs
|
||||
uploadId: 467433
|
||||
72
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShakePosition.cs
vendored
Normal file
72
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShakePosition.cs
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ShakePosition : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Vector3 _initialPosition;
|
||||
Vector3 _intensity;
|
||||
|
||||
//Constructor:
|
||||
public ShakePosition (Transform target, Vector3 initialPosition, Vector3 intensity, float duration, float delay, AnimationCurve curve, Action startCallback, Action completeCallback, Tween.LoopType loop, bool obeyTimescale)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Position, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
_initialPosition = initialPosition;
|
||||
_intensity = intensity;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
if (percentage == 0)
|
||||
{
|
||||
_target.localPosition = _initialPosition;
|
||||
}
|
||||
|
||||
percentage = 1 - percentage;
|
||||
|
||||
//create diminishing shake offset:
|
||||
Vector3 amount = _intensity * percentage;
|
||||
amount.x = UnityEngine.Random.Range (-amount.x, amount.x);
|
||||
amount.y = UnityEngine.Random.Range (-amount.y, amount.y);
|
||||
amount.z = UnityEngine.Random.Range (-amount.z, amount.z);
|
||||
|
||||
//apply:
|
||||
_target.localPosition = _initialPosition + amount;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.localPosition = _initialPosition;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShakePosition.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ShakePosition.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17925bf63614b3748bafb01b368ed6fa
|
||||
timeCreated: 1486068697
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ShakePosition.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Size.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Size.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class Size : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector2 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
RectTransform _target;
|
||||
Vector2 _start;
|
||||
|
||||
//Constructor:
|
||||
public Size (RectTransform target, Vector2 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Size, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.sizeDelta;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector2 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.sizeDelta = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.sizeDelta = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.sizeDelta = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.sizeDelta;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Size.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Size.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5e31dcc8665443edbdcf934d90efd58
|
||||
timeCreated: 1462333474
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/Size.cs
|
||||
uploadId: 467433
|
||||
82
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SplinePercentage.cs
vendored
Normal file
82
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SplinePercentage.cs
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class SplinePercentage : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Transform _target;
|
||||
Spline _spline;
|
||||
float _startPercentage;
|
||||
bool _faceDirection;
|
||||
|
||||
//Constructor:
|
||||
public SplinePercentage (Spline spline, Transform target, float startPercentage, float endPercentage, bool faceDirection, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//clamps:
|
||||
if (!spline.loop)
|
||||
{
|
||||
startPercentage = Mathf.Clamp01 (startPercentage);
|
||||
endPercentage = Mathf.Clamp01 (endPercentage);
|
||||
}
|
||||
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Spline, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_spline = spline;
|
||||
_target = target;
|
||||
EndValue = endPercentage;
|
||||
_startPercentage = startPercentage;
|
||||
_faceDirection = faceDirection;
|
||||
}
|
||||
|
||||
//Operation:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_startPercentage, EndValue, percentage);
|
||||
_target.position = _spline.GetPosition (calculatedValue);
|
||||
if (_faceDirection)
|
||||
{
|
||||
if (_spline.direction == SplineDirection.Forward)
|
||||
{
|
||||
_target.LookAt (_target.position + _spline.GetDirection (calculatedValue));
|
||||
}else{
|
||||
_target.LookAt (_target.position - _spline.GetDirection (calculatedValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.position = _spline.GetPosition (_startPercentage);
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
float temp = EndValue;
|
||||
EndValue = _startPercentage;
|
||||
_startPercentage = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SplinePercentage.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SplinePercentage.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70d61777ac18a484694038ac838becb0
|
||||
timeCreated: 1484796795
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/SplinePercentage.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SpriteRendererColor.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SpriteRendererColor.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class SpriteRendererColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
SpriteRenderer _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public SpriteRendererColor (SpriteRenderer target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.SpriteRendererColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SpriteRendererColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/SpriteRendererColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92426e2b7b877402ea5fe22789823969
|
||||
timeCreated: 1462325508
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/SpriteRendererColor.cs
|
||||
uploadId: 467433
|
||||
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextColor.cs
vendored
Normal file
63
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextColor.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class TextColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Text _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public TextColor (Text target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.TextColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e74af8e41017d4378ae7489326d95129
|
||||
timeCreated: 1470188674
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/TextColor.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextMeshColor.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextMeshColor.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class TextMeshColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
TextMesh _target;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public TextMeshColor (TextMesh target, Color endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.TextMeshColor, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.color;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.color = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.color = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.color;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextMeshColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/TextMeshColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa996bdcab18a6e48bd4e305c560e0a0
|
||||
timeCreated: 1466017237
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/TextMeshColor.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueColor.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueColor.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueColor : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Color EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<Color> _valueUpdatedCallback;
|
||||
Color _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueColor (Color startValue, Color endValue, Action<Color> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Color calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback (calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
Color temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueColor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueColor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d59f4245ccff47fd86aece5211dbe42
|
||||
timeCreated: 1462827738
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueColor.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueFloat.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueFloat.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueFloat : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<float> _valueUpdatedCallback;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueFloat (float startValue, float endValue, Action<float> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback (calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
float temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueFloat.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueFloat.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5470d3e284875425083ba892d8cc99e6
|
||||
timeCreated: 1462821401
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueFloat.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueInt.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueInt.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueInt : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<int> _valueUpdatedCallback;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueInt (int startValue, int endValue, Action<int> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback ((int)calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
float temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueInt.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueInt.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81e622983fc554fbaa23a3d995f233a8
|
||||
timeCreated: 1462827646
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueInt.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueRect.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueRect.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueRect : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Rect EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<Rect> _valueUpdatedCallback;
|
||||
Rect _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueRect (Rect startValue, Rect endValue, Action<Rect> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Rect calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback (calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
Rect temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueRect.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueRect.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c172567e15d4547b3a5d6202c9e4d275
|
||||
timeCreated: 1462828008
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueRect.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector2.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector2.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueVector2 : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector2 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<Vector2> _valueUpdatedCallback;
|
||||
Vector2 _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueVector2 (Vector2 startValue, Vector2 endValue, Action<Vector2> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector2 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback (calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
Vector2 temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector2.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector2.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4f44eff667aa449fbaec5de6ca950b1
|
||||
timeCreated: 1462827858
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueVector2.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector3.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector3.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueVector3 : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector3 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<Vector3> _valueUpdatedCallback;
|
||||
Vector3 _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueVector3 (Vector3 startValue, Vector3 endValue, Action<Vector3> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector3 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback (calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
Vector3 temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector3.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector3.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d91366d80b3d246feb2f31aa9508e61d
|
||||
timeCreated: 1462827907
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueVector3.cs
|
||||
uploadId: 467433
|
||||
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector4.cs
vendored
Normal file
60
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector4.cs
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class ValueVector4 : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public Vector4 EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
Action<Vector4> _valueUpdatedCallback;
|
||||
Vector4 _start;
|
||||
|
||||
//Constructor:
|
||||
public ValueVector4 (Vector4 startValue, Vector4 endValue, Action<Vector4> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_valueUpdatedCallback = valueUpdatedCallback;
|
||||
_start = startValue;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
Vector4 calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_valueUpdatedCallback (calculatedValue);
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
Vector4 temp = _start;
|
||||
_start = EndValue;
|
||||
EndValue = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector4.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/ValueVector4.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11eba477d71d84917ba2fd0e29cbebc1
|
||||
timeCreated: 1462827959
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/ValueVector4.cs
|
||||
uploadId: 467433
|
||||
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Volume.cs
vendored
Normal file
62
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Volume.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Pixelplacement;
|
||||
|
||||
namespace Pixelplacement.TweenSystem
|
||||
{
|
||||
class Volume : TweenBase
|
||||
{
|
||||
//Public Properties:
|
||||
public float EndValue {get; private set;}
|
||||
|
||||
//Private Variables:
|
||||
AudioSource _target;
|
||||
float _start;
|
||||
|
||||
//Constructor:
|
||||
public Volume (AudioSource target, float endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Tween.LoopType loop, Action startCallback, Action completeCallback)
|
||||
{
|
||||
//set essential properties:
|
||||
SetEssentials (Tween.TweenType.Volume, target.GetInstanceID (), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
|
||||
|
||||
//catalog custom properties:
|
||||
_target = target;
|
||||
EndValue = endValue;
|
||||
}
|
||||
|
||||
//Processes:
|
||||
protected override bool SetStartValue ()
|
||||
{
|
||||
if (_target == null) return false;
|
||||
_start = _target.volume;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Operation (float percentage)
|
||||
{
|
||||
float calculatedValue = TweenUtilities.LinearInterpolate (_start, EndValue, percentage);
|
||||
_target.volume = calculatedValue;
|
||||
}
|
||||
|
||||
//Loops:
|
||||
public override void Loop ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.volume = _start;
|
||||
}
|
||||
|
||||
public override void PingPong ()
|
||||
{
|
||||
ResetStartTime ();
|
||||
_target.volume = EndValue;
|
||||
EndValue = _start;
|
||||
_start = _target.volume;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Volume.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/Tween/TweenActions/Volume.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1f4c0f9f2a8648deb7d40b0f326eabd
|
||||
timeCreated: 1462335281
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/Tween/TweenActions/Volume.cs
|
||||
uploadId: 467433
|
||||
Reference in New Issue
Block a user