-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeToLerpOperation.cs
More file actions
19 lines (17 loc) · 978 Bytes
/
TypeToLerpOperation.cs
File metadata and controls
19 lines (17 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections.Generic;
using UnityEngine;
namespace TyesStuff.Animation.TweenLib
{
public class TypeToLerpOperation
{
public static Dictionary<string, Func<object, object, float, object>> NameToOperation = new Dictionary<string, Func<object, object, float, object>>
{
{ "Float", (object A, object B, float T) => { return Mathf.LerpUnclamped((float)A, (float)B, T); } },
{ "UnityEngine.Vector2", (object A, object B, float T) => { return Vector2.LerpUnclamped((Vector2)A, (Vector2)B, T); } },
{ "UnityEngine.Vector3", (object A, object B, float T) => { return Vector3.LerpUnclamped((Vector3)A, (Vector3)B, T); } },
{ "UnityEngine.Vector4", (object A, object B, float T) => { return Vector4.LerpUnclamped((Vector4)A, (Vector4)B, T); } },
{ "UnityEngine.Color", (object A, object B, float T) => { return Color.LerpUnclamped((Color)A, (Color)B, T); } }
};
}
}