示例#1
0
 public static DoMultiple Instance(int doTimes, int cooldown, Behavior behavior)
 {
     var key = new Tuple<int, int, Behavior>(doTimes, cooldown, behavior);
     DoMultiple ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new DoMultiple(doTimes, cooldown, behavior);
     return ret;
 }
示例#2
0
        public static DoMultiple Instance(int doTimes, int cooldown, Behavior behavior)
        {
            var        key = new Tuple <int, int, Behavior>(doTimes, cooldown, behavior);
            DoMultiple ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new DoMultiple(doTimes, cooldown, behavior);
            }
            return(ret);
        }