备份CatanBuilding瘦身独立工程
This commit is contained in:
36
Assets/Scripts/UI/Potion/Action/PotionDelayAction.cs
Normal file
36
Assets/Scripts/UI/Potion/Action/PotionDelayAction.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user