Example #1
0
 public static MultiAttack Instance(float radius, float angle, int numShot, float offset = 0, int projectileIndex = 0)
 {
     var key = new Tuple<float, float, int, float, int>(radius, angle, numShot, offset, projectileIndex);
     MultiAttack ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new MultiAttack(radius, angle, numShot, offset, projectileIndex);
     return ret;
 }
Example #2
0
        public static MultiAttack Instance(float radius, float angle, int numShot, float offset = 0, int projectileIndex = 0)
        {
            var         key = new Tuple <float, float, int, float, int>(radius, angle, numShot, offset, projectileIndex);
            MultiAttack ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new MultiAttack(radius, angle, numShot, offset, projectileIndex);
            }
            return(ret);
        }