Esempio n. 1
0
 public static OrderAllEntity Instance(float radius, short objType, Behavior behav)
 {
     var key = new Tuple<float, short, Behavior>(radius, objType, behav);
     OrderAllEntity ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new OrderAllEntity(radius, objType, behav);
     return ret;
 }
Esempio n. 2
0
        public static OrderAllEntity Instance(float radius, short objType, Behavior behav)
        {
            var            key = new Tuple <float, short, Behavior>(radius, objType, behav);
            OrderAllEntity ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new OrderAllEntity(radius, objType, behav);
            }
            return(ret);
        }