public static SimpleWandering Instance(float speed, float dist = 1f)
 {
     var key = new Tuple<float, float>(speed, dist);
     SimpleWandering ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new SimpleWandering(speed, dist);
     return ret;
 }
Esempio n. 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);
        }