示例#1
0
 public static ThrowAttack Instance(float bombRadius, float sightRadius, int damage, float offsetAngle = 0)
 {
     var key = new Tuple<float, float, int, float>(bombRadius, sightRadius, damage, offsetAngle);
     ThrowAttack ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new ThrowAttack(bombRadius, sightRadius, damage, offsetAngle);
     return ret;
 }
示例#2
0
        public static ThrowAttack Instance(float bombRadius, float sightRadius, int damage)
        {
            var         key = new Tuple <float, float, int>(bombRadius, sightRadius, damage);
            ThrowAttack ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new ThrowAttack(bombRadius, sightRadius, damage);
            }
            return(ret);
        }