using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using DG.Tweening;
using UnityEngine.U2D;
using ActionForm = System.Action<string, int>;
//using UnityEditor;
public enum RedStateType
{
HERO_RED,//英灵红点
HERO_UPGRADE,//进阶红点
HERO_DESTINY,//宿命红点
HERO_TREE,//树枝红点
HERO_STORY,//故事红点
HERO_SKILL_SLOT,//空技能槽红点
HERO_SKILL_SLOT_ID,//指定空技能槽红点
};
public delegate bool RedFunctionDelegate(params object[] paramNames);
public class RedPoint : MonoBehaviour
{
public List<RedStateType> _keys;
private Dictionary<RedStateType, RedFunctionDelegate> _dic = new Dictionary<RedStateType, RedFunctionDelegate>();
void Awake()
{
if (this._dic.Count > 0)
return;
_dic.Add(RedStateType.HERO_RED, RedController.Ins.isHeroRed);
_dic.Add(RedStateType.HERO_UPGRADE, RedController.Ins.isHeroUpgradeRed);
_dic.Add(RedStateType.HERO_DESTINY,
枚举类型作为key,函数作为value的delegate调用方案
最新推荐文章于 2023-08-31 09:47:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)