예제 #1
0
 public static AimedAttack Instance(float radius, short? objType, int projectileIndex = 0)
 {
   var key = new Tuple<float, short?, int>(radius, objType, projectileIndex);
   AimedAttack ret;
   if (!instances.TryGetValue(key, out ret))
     ret = instances[key] = new AimedAttack(radius, objType, projectileIndex);
   return ret;
 }
예제 #2
0
        public static AimedAttack Instance(float radius, short?objType, int projectileIndex = 0)
        {
            var         key = new Tuple <float, short?, int>(radius, objType, projectileIndex);
            AimedAttack ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new AimedAttack(radius, objType, projectileIndex);
            }
            return(ret);
        }