refactor: 拆分D2 Sleep表现并接入快照
This commit is contained in:
@@ -415,77 +415,6 @@ namespace AibisDream
|
||||
yield return SpriteShowcase.Instance.ShowObj(picName, duration);
|
||||
}
|
||||
|
||||
[YarnCommand("show_sprite_motion")]
|
||||
public static IEnumerator ShowSpriteMotion(string picName, string motionProfile, float duration = 0.35f)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) yield break;
|
||||
yield return showcase.ShowObjWithMotion(picName, motionProfile, duration);
|
||||
}
|
||||
|
||||
[YarnCommand("sprite_motion")]
|
||||
public static IEnumerator SpriteMotion(string motionProfile, float leadDuration = 0.18f)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) yield break;
|
||||
|
||||
showcase.PlayCurrentMotion(motionProfile);
|
||||
if (leadDuration > 0f)
|
||||
{
|
||||
yield return new WaitForSeconds(leadDuration);
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("kite_show")]
|
||||
public static IEnumerator KiteShow(float height = 0, int wind = 0, float duration = 0.35f)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) yield break;
|
||||
yield return showcase.ShowKite(height, wind, duration);
|
||||
}
|
||||
|
||||
[YarnCommand("kite_state")]
|
||||
public static IEnumerator KiteState(float height, int wind, float duration = 0.9f, float leadDuration = 0.35f)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) yield break;
|
||||
|
||||
showcase.SetKiteState(height, wind, duration);
|
||||
if (leadDuration > 0f)
|
||||
{
|
||||
yield return new WaitForSeconds(Mathf.Min(leadDuration, duration));
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("kite_wind")]
|
||||
public static void KiteWind(int wind, float turbulence = -1f)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) return;
|
||||
showcase.SetKiteWind(wind, turbulence);
|
||||
}
|
||||
|
||||
[YarnCommand("kite_accent")]
|
||||
public static IEnumerator KiteAccent(string profile, float leadDuration = 0.18f)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) yield break;
|
||||
|
||||
showcase.PlayKiteAccent(profile);
|
||||
if (leadDuration > 0f)
|
||||
{
|
||||
yield return new WaitForSeconds(leadDuration);
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("kite_hide")]
|
||||
public static IEnumerator KiteHide(float duration = 1)
|
||||
{
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null) yield break;
|
||||
yield return showcase.HideKite(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("hide_sprite")]
|
||||
public static IEnumerator HideSprite(float duration = 1)
|
||||
{
|
||||
@@ -522,47 +451,6 @@ namespace AibisDream
|
||||
yield return SpriteShowcase.Instance.ShowLargeObj(picName, duration);
|
||||
}
|
||||
|
||||
[YarnCommand("show_large_sprite_animation")]
|
||||
public static IEnumerator ShowLargeSpriteAnimation(
|
||||
string picNamePrefix,
|
||||
int frameCount,
|
||||
float secondsPerFrame = 0.2f,
|
||||
float duration = 1f)
|
||||
{
|
||||
yield return SpriteShowcase.Instance.ShowLargeSpriteAnimation(
|
||||
picNamePrefix,
|
||||
frameCount,
|
||||
secondsPerFrame,
|
||||
duration);
|
||||
}
|
||||
|
||||
[YarnCommand("set_large_sprite_blur")]
|
||||
public static void SetLargeSpriteBlur(float amount, float blurSize = 0.012f)
|
||||
{
|
||||
SpriteShowcase.Instance.SetLargeSpriteBlur(amount, blurSize);
|
||||
}
|
||||
|
||||
[YarnCommand("tween_large_sprite_blur")]
|
||||
public static IEnumerator TweenLargeSpriteBlur(
|
||||
float targetAmount,
|
||||
float duration,
|
||||
float blurSize = 0.012f)
|
||||
{
|
||||
yield return SpriteShowcase.Instance.TweenLargeSpriteBlur(targetAmount, duration, blurSize);
|
||||
}
|
||||
|
||||
[YarnCommand("tween_large_sprite_blur_async")]
|
||||
public static void TweenLargeSpriteBlurAsync(
|
||||
float targetAmount,
|
||||
float duration,
|
||||
float blurSize = 0.012f)
|
||||
{
|
||||
if (DialogController.Instance == null) return;
|
||||
|
||||
DialogController.Instance.StartCoroutine(
|
||||
SpriteShowcase.Instance.TweenLargeSpriteBlur(targetAmount, duration, blurSize));
|
||||
}
|
||||
|
||||
[YarnCommand("hide_large_sprite")]
|
||||
public static IEnumerator HideLargeSprite(float duration = 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user