Beispiel #1
0
 public static Collectable CreateCollectable(CollectableWeaponInfo info)
 {
     if (factories == null || !factories.ContainsKey(info.WeaponInfo.WeaponType))
     {
         throw new ArgumentException();
     }
     return(factories[info.WeaponInfo.WeaponType].CreateCollectable(info));
 }
Beispiel #2
0
        public override CollectableWeapon CreateCollectable(CollectableWeaponInfo info)
        {
            var position = info.Position.Copy();

            return(new CollectableWeapon(
                       CreateGun(info.WeaponInfo.AmmoAmount),
                       new RigidCircle(position, 40, true, true),
                       new SpriteContainer(
                           new StaticSprite(collectableIcon, 0, collectableIcon.Size), position, info.Angle)));
        }
 public abstract CollectableWeapon CreateCollectable(CollectableWeaponInfo info);