40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using UnityEngine;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream.FixSystem
|
|
{
|
|
public static class OpenYarnCommand
|
|
{
|
|
private static ShockSystem ShockSystem => FixSystemCenter.SystemDic.Get<ShockSystem>();
|
|
|
|
[YarnCommand("play_shock_flash")]
|
|
public static IEnumerator PlayShockFlash()
|
|
{
|
|
yield return ShockSystem.PlayFlashEffect();
|
|
}
|
|
|
|
[YarnCommand("play_shock_flashback")]
|
|
public static IEnumerator PlayShockFlashback(string imagePath)
|
|
{
|
|
var spriteFlashSystem = ShockSystem.GetComponent<SpriteFlashSystem>();
|
|
if (spriteFlashSystem != null)
|
|
{
|
|
yield return spriteFlashSystem.TriggerFlash(imagePath);
|
|
}
|
|
}
|
|
|
|
[YarnCommand("start_shock")]
|
|
public static IEnumerator StartShock()
|
|
{
|
|
yield return ShockSystem.StartShock();
|
|
}
|
|
|
|
[YarnCommand("auto_charge_and_release")]
|
|
public static IEnumerator AutoChargeAndRelease()
|
|
{
|
|
yield return ShockSystem.AutoChargeAndRelease();
|
|
}
|
|
}
|
|
} |