Files
back_cantanBuilding/Assets/Scripts/UI/Potion/Action/PotionDelayAction.cs
2026-05-26 16:15:54 +08:00

37 lines
1.0 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace game
{
public class PotionDelayAction : PotionAction
{
int m_Type = 0;
PotionGridUI m_TargetGridUI;
PotionGridUI m_SrcGridUI;
PotionGridUI m_TemporaryGridUI;
public Func<int, PotionGridUI, PotionGridUI, PotionGridUI, int> m_Callback = null;
public void SetData(int type, PotionGridUI src, PotionGridUI target, PotionGridUI temporary, Func<int, PotionGridUI, PotionGridUI, PotionGridUI, int> callback)
{
m_Type = type;
m_SrcGridUI = src;
m_TargetGridUI = target;
m_TemporaryGridUI = temporary;
m_Callback = callback;
}
#region
public override void Action()
{
base.Action();
if (m_Callback != null)
{
m_Callback.Invoke(m_Type, m_SrcGridUI, m_TargetGridUI, m_TemporaryGridUI);
}
}
#endregion
}
}