Beispiel #1
0
 public static GameEventBinder <T, Y> GetOrCreate(Y obj, GameEvents e)
 {
     if (!pool.ContainsKey(obj))
     {
         pool[obj] = new GameEventBinder <T, Y>(obj, e);
     }
     return(pool[obj]);
 }
Beispiel #2
0
        public static void UnbindEvents(this IGamePlayer _this, GameEvents evt)
        {
            var a = GameEventBinder <ContextType, IGamePlayer> .GetOrCreate(_this, evt);

            a.unbindEvents();
        }
Beispiel #3
0
        public static void BindEvents(this IGameMonitor _this, GameEvents evt)
        {
            var a = GameEventBinder <ContextType, IGameMonitor> .GetOrCreate(_this, evt);

            a.bindEvents();
        }