示例#1
0
        public void Fire()
        {
            MiniGun m = (MiniGun)itemSelecter.getItem(Items_List.Minigun);

            m.soundPlayer.Play();
            while (m.isFire)
            {
                PictureBox bullet = m.operate(mousePoint);


                if (pictureBox1.InvokeRequired)
                {
                    pictureBox1.Invoke(new MethodInvoker(delegate()
                    {
                        pictureBox1.Controls.Add(bullet);
                    }));
                }
                else
                {
                    pictureBox1.Controls.Add(bullet);
                }
                Thread.Sleep(20);
            }
            m.soundPlayer.Stop();
        }
示例#2
0
 public HWGuy()
 {
     _weapon1    = new MiniGun();
     _weapon2    = new SuperShotgun();
     _weapon3    = new Shotgun();
     _weapon4    = new Axe();
     _gren1      = Ammunition.FragGrenade;
     _gren2      = Ammunition.MIRVGrenade;
     _health     = 100;
     _armour     = 300;
     _maxShells  = 200;
     _maxNails   = 50;
     _maxRockets = 50;
     _maxCells   = 50;
     _maxGren1   = 4;
     _maxGren2   = 2;
 }
示例#3
0
    // Update is called once per frame

    void Awake()
    {
        instance      = this;
        ammoText.text = currentAmmo.ToString();
    }
 public void Awake()
 {
     miniGun = GetComponent <MiniGun>();
 }