Esempio n. 1
0
 public static TossEnemy Instance(float angle, float range, short objType)
 {
     var key = new Tuple<float, float, short>(angle, range, objType);
     TossEnemy ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new TossEnemy(angle, range, objType);
     return ret;
 }
Esempio n. 2
0
        public static TossEnemy Instance(float angle, float range, short objType)
        {
            var       key = new Tuple <float, float, short>(angle, range, objType);
            TossEnemy ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new TossEnemy(angle, range, objType);
            }
            return(ret);
        }