Example #1
0
        public static Chasing Instance(float speed, float radius, float targetRadius, short?objType)
        {
            var     key = new Tuple <float, float, float, short?>(speed, radius, targetRadius, objType);
            Chasing ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new Chasing(speed, radius, targetRadius, objType);
            }
            return(ret);
        }
Example #2
0
 public static Chasing Instance(float speed, float radius, float targetRadius, short? objType)
 {
     var key = new Tuple<float, float, float, short?>(speed, radius, targetRadius, objType);
     Chasing ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new Chasing(speed, radius, targetRadius, objType);
     return ret;
 }