Files
test/Assets/PerfectWorld/Scripts/Players/CECActionContext.cs
T
2026-01-27 19:47:15 +07:00

49 lines
1.3 KiB
C#

using BrewMonster.Assets.PerfectWorld.Scripts.Players;
using System.Collections.Generic;
using UnityEngine;
namespace BrewMonster
{
public enum ActionContextType
{
AC_NONE = 0,
AC_RIDETOFLY,
AC_RIDETOSKILL,
AC_FLYTORIDE,
AC_RIDETOUSETARGETITEM,
}
public class CECActionContext
{
public ActionContextType ContextType { get; set; }
public List<CECActionBase> m_actions;
CECHostPlayer m_pHostPlayer;
bool m_bForceRemove;
CECContextValidChecker m_ErrorCtr;
public bool IsContext(ActionContextType contextType)
{
return ContextType == contextType;
}
public int GetActionCount() { return m_actions.Count; }
public CECActionBase GetLastAction()
{
return GetAction(GetActionCount() - 1);
}
public CECActionBase GetAction(int index)
{
if (index >= 0 && index < GetActionCount())
return m_actions[index];
else
return null;
}
public virtual bool NeedCheckValid() { return false; }
public CECHostPlayer GetHostPlayer() { return m_pHostPlayer;}
public void SetForceRemove(bool v) { m_bForceRemove = v; }
}
}