コード例 #1
0
        public void Register(GameCommandType type, GameCommandHandler gch)
        {
            List <Action <object> > callbackList;

            if (!handerDic.TryGetValue(type, out callbackList))
            {
                handerDic[type] = new List <Action <object> >();
                callbackList    = handerDic[type];
            }

            callbackList.Add(gch.OnInteractor);
        }
コード例 #2
0
 public void Remove(GameCommandType type, GameCommandHandler handler)
 {
     handerDic[type].Remove(handler.OnInteractor);
 }