备份CatanBuilding瘦身独立工程
This commit is contained in:
32
Assets/Scripts/UI/Potion/Action/PotionDelay1Action.cs
Normal file
32
Assets/Scripts/UI/Potion/Action/PotionDelay1Action.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using NSubstitute;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace game
|
||||
{
|
||||
public class PotionDelay1Action : PotionAction
|
||||
{
|
||||
int m_Type = 0;
|
||||
PotionGridUI m_PotionGridUI;
|
||||
Action<int, PotionGridUI> m_Callback;
|
||||
|
||||
public void SetData(int type, PotionGridUI gridUI, Action<int, PotionGridUI> callback)
|
||||
{
|
||||
m_Type = type;
|
||||
m_PotionGridUI = gridUI;
|
||||
m_Callback = callback;
|
||||
}
|
||||
#region 生命周期
|
||||
public override void Action()
|
||||
{
|
||||
base.Action();
|
||||
if (m_Callback != null)
|
||||
{
|
||||
m_Callback.Invoke(m_Type, m_PotionGridUI);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user