本文整理汇总了C#中Ease类的典型用法代码示例。如果您正苦于以下问题:C# Ease类的具体用法?C# Ease怎么用?C# Ease使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Ease类属于命名空间,在下文中一共展示了Ease类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GearBase
public GearBase(GObject owner)
{
_owner = owner;
pageSet = new PageOptionSet();
easeType = Ease.OutQuad;
tweenTime = 0.3f;
}
示例2: QuaternionMemberCurve
public QuaternionMemberCurve(string propName, Ease ease, float dur, Quaternion start, Quaternion end, bool slerp)
: base(propName, ease, dur)
{
_start = start;
_end = end;
_useSlerp = slerp;
}
示例3: CreateReelSymbols
public void CreateReelSymbols(JSlotGame slot, int reelIndex, int reelHeight)
{
this.slot = slot;
//this.reelIndex = reelIndex;
this.reelLength = reelHeight + 2;
this.cellHeight = slot.maker.cellHeight;
this.cellMoveCount = slot.maker.cellsSpinCount[reelIndex];
this.cellTweenTime = slot.maker.cellTweenTime;
//this.firstMoveEase = slot.maker.firstMoveEase;
this.lastMoveEase = slot.maker.lastMoveEase;
this.speed = slot.maker.reel2Speed;
symbols = new List<GameObject>(8);
for (int i = 0; i < reelLength; ++i)
//CreateSymbolInQueue(i);
{
int symbolIndex = GetSymbolIndex();
GameObject newOne = CreateSymbol(i, symbolIndex);
symbols.Add(newOne);
}
this.myTransform = this.transform;
ResetReelPosition();
}
示例4: Get
public static Func<float, float, float, float> Get(Ease ease)
{
switch(ease)
{
case Ease.Linear:
return Linear;
case Ease.BackIn:
return InBack;
case Ease.BackOut:
return OutBack;
case Ease.BackInOut:
return InOutBack;
case Ease.CircIn:
return InCirc;
case Ease.CircOut:
return OutCirc;
case Ease.CircInOut:
return InOutCirc;
case Ease.CubicIn:
return InCubic;
case Ease.CubicOut:
return OutCubic;
case Ease.CubicInOut:
return InOutCubic;
default:
throw new Exception("Not supported ease type: " + ease);
}
}
示例5: MemberCurve
public MemberCurve(string propName, Ease ease, float dur)
{
_memberName = propName;
_ease = ease;
_dur = dur;
_delay = 0f;
}
示例6: GearBase
public GearBase(GObject owner)
{
_owner = owner;
easeType = Ease.OutQuad;
tweenTime = 0.3f;
delay = 0;
}
示例7: StringCurve
public StringCurve(string propName, Ease ease, float dur, string start, string end, StringTweenStyle style)
: base(propName, ease, dur)
{
_start = start;
_end = end;
_style = style;
}
示例8: Vector2MemberCurve
public Vector2MemberCurve(string propName, Ease ease, float dur, Vector2 start, Vector2 end, bool slerp)
: base(propName, ease, dur)
{
_start = start;
_end = end;
_useSlerp = slerp;
}
示例9: MeshCurve
public MeshCurve(Mesh[] meshes, Ease ease, float dur)
{
_meshes = meshes;
_ease = ease;
_dur = dur;
// At least two meshes
if (_meshes.Length < 2)
{
throw new System.ArgumentException("MeshCurve requires at least 2 source meshes.", "meshes");
}
// Make sure all meshes are assigned and shaped correctly!
int vertexCount = (_meshes[0] != null) ? _meshes[0].vertexCount : 0;
for (int i = 0; i < _meshes.Length; i++)
{
if (_meshes[i] == null)
{
throw new System.ArgumentNullException("Mesh " + i + " is null.", "meshes");
}
if (_meshes[i].vertexCount != vertexCount)
{
throw new System.ArgumentException("Mesh " + i + " doesn't have the same number of vertices as the first mesh", "meshes");
}
}
}
示例10: Vector3MemberCurve
public Vector3MemberCurve(string propName, Ease ease, float dur, Vector3 start, Vector3 end)
: base(propName, ease, dur)
{
_start = start;
_end = end;
_useSlerp = false;
}
示例11: TransMemberCurve
public TransMemberCurve(string propName, Ease ease, float dur, Trans start, Trans end, bool slerp)
: base(propName, ease, dur)
{
_start = start;
_end = end;
_useSlerp = slerp;
}
示例12: SetTextureEase
void SetTextureEase(Ease easeType, Texture2D tx, float elapsed, int y)
{
int x = (int)((txW - 1) * (elapsed / tweenDuration));
if (y > txH - 1 || y < 0) return; // elastic/back eases
tx.SetPixel(x, y, Color.white);
tx.Apply();
}
示例13: FilteredEasePopup
// ===================================================================================
// PUBLIC METHODS --------------------------------------------------------------------
// Ease popup with filtered eases
public static Ease FilteredEasePopup(Ease currEase)
{
int stringEaseId = currEase == Ease.INTERNAL_Custom
? FilteredEaseTypes.Length - 1
: Array.IndexOf(FilteredEaseTypes, currEase.ToString());
if (stringEaseId == -1) stringEaseId = 0;
stringEaseId = EditorGUILayout.Popup("Ease", stringEaseId, FilteredEaseTypes);
return stringEaseId == FilteredEaseTypes.Length - 1 ? Ease.INTERNAL_Custom : (Ease)Enum.Parse(typeof(Ease), FilteredEaseTypes[stringEaseId]);
}
示例14: Interpolate
public static double Interpolate(float x, float x1, float x2, float y1, float y2, Ease ease)
{
if (ease == null)
ease = Linear.EaseNone;
var c = y2 - y1;
var d = x2 - x1;
return ease (x - x1, y1, c, d);
}
示例15: Tween
public Tween(Setter<float> setter, float start, float target, float duration, Ease ease = null, bool yoyo = false, Action onComplete = null)
{
Setter = setter;
_start = start;
_target = target;
_duration = duration;
_ease = ease ?? Linear.EaseNone;
_change = target - start;
_elapsedTime = 0;
OnComplete = onComplete;
_yoyo = yoyo;
}