예제 #1
0
        public static PetChasingEnemy Instance(float speed, float radius, float targetRadius)
        {
            var             key = new Tuple <float, float, float>(speed, radius, targetRadius);
            PetChasingEnemy ret;

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