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; }
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); }