Exemplo n.º 1
0
        public WeaponModScreen(int playerIndex, Player player, BasicGun gun, World world)
            : base("Player " + (playerIndex + 1) + ": Modding " + gun.GunType.ToString())
        {
            this.player = player;
            this.gun = gun;
            this.world = world;

            // create menu entries
            lazerMenuEntry = new MenuEntry(string.Empty);
            extendedClipMenuEntry = new MenuEntry(string.Empty);
            fullAutoMenuEntry = new MenuEntry(string.Empty);
            fastReloadMenuEntry = new MenuEntry(string.Empty);
            moreAmmoMenuEntry = new MenuEntry(string.Empty);
            fmjMenuEntry = new MenuEntry(string.Empty);

            SetMenuEntryText();

            MenuEntry back = new MenuEntry("Exit Shop");

            // hook up event handlers
            lazerMenuEntry.Selected += LazerMenuEntrySelected;
            extendedClipMenuEntry.Selected += ExtendedClipMenuEntrySelected;
            fullAutoMenuEntry.Selected += FullAutoMenuEntrySelected;
            fastReloadMenuEntry.Selected += FastReloadMenuEntrySelected;
            moreAmmoMenuEntry.Selected += MoreAmmoMenuEntrySelected;
            fmjMenuEntry.Selected += FmjMenuEntrySelected;
            back.Selected += OnCancel;

            // add menu entries to screen
            MenuEntries.Add(lazerMenuEntry);
            MenuEntries.Add(extendedClipMenuEntry);
            MenuEntries.Add(fullAutoMenuEntry);
            MenuEntries.Add(fastReloadMenuEntry);
            MenuEntries.Add(moreAmmoMenuEntry);
            MenuEntries.Add(fmjMenuEntry);

            MenuEntries.Add(back);
        }
Exemplo n.º 2
0
 public virtual void LoseGun(BasicGun gun)
 {
     GunsOwned.Remove(gun);
 }
Exemplo n.º 3
0
 public virtual void GetGun(BasicGun gun)
 {
     GunsOwned.Add(gun);
 }