Tween:新增MaterialColor

This commit is contained in:
xiaobo
2025-06-26 14:23:14 +08:00
parent aee8a4a3dc
commit 4a1f2b52f6
2 changed files with 12 additions and 2 deletions

View File

@@ -205,7 +205,8 @@ namespace TEngine
public long Color(UnityEngine.SpriteRenderer target, UnityEngine.Color startValue, UnityEngine.Color endValue, float duration, Ease ease = Ease.Default, int cycles = 1,
CycleMode cycleMode = CycleMode.Restart, float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false);
public long MaterialColor(UnityEngine.Material target, UnityEngine.Color startValue, UnityEngine.Color endValue, float duration, Ease ease = Ease.Default, int cycles = 1,
CycleMode cycleMode = CycleMode.Restart, float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false);
public long Alpha(UnityEngine.SpriteRenderer target, Single endValue, float duration, Ease ease = Ease.Default, int cycles = 1, CycleMode cycleMode = CycleMode.Restart,
float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false);

View File

@@ -486,7 +486,16 @@ namespace TEngine
return _tweenHelper.Color(target, startValue, endValue, duration, ease, cycles, cycleMode, startDelay, endDelay, useUnscaledTime);
}
public static long MaterialColor(UnityEngine.Material target, UnityEngine.Color startValue, UnityEngine.Color endValue, float duration, Ease ease = Ease.Default, int
cycles = 1,
CycleMode cycleMode = CycleMode.Restart, float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false)
{
if (_tweenHelper == null)
{
throw new GameFrameworkException("ITweenHelper is invalid.");
}
return _tweenHelper.MaterialColor(target, startValue, endValue, duration, ease, cycles, cycleMode, startDelay, endDelay, useUnscaledTime);
}
public static long Alpha(UnityEngine.SpriteRenderer target, Single endValue, float duration, Ease ease = Ease.Default, int cycles = 1, CycleMode cycleMode = CycleMode.Restart,
float startDelay = 0, float endDelay = 0, bool useUnscaledTime = false)
{