Пример #1
0
 public static SimpleWandering Instance(float speed, float dist = 1f)
 {
     Tuple<float, float> key = new Tuple<float, float>(speed, dist);
     SimpleWandering ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new SimpleWandering(speed, dist);
     return ret;
 }
Пример #2
0
        public static SimpleWandering Instance(float speed, float dist = 1f)
        {
            Tuple <float, float> key = new Tuple <float, float>(speed, dist);
            SimpleWandering      ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new SimpleWandering(speed, dist);
            }
            return(ret);
        }