示例#1
0
        public static PetChasing Instance(float speed, float radius, float targetRadius)
        {
            var        key = new Tuple <float, float, float>(speed, radius, targetRadius);
            PetChasing ret;

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