Пример #1
0
        /// <summary>
        /// Handle mouse down
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HandleMouseClick(object sender, MouseEventArgs e)
        {
            //Makes sure game is loaded before registering mouse clicks
            if (worldExists)
            {
                //If normal weapon was used
                if (e.Button == MouseButtons.Left)
                {
                    theController.WeaponFire("left");
                    panel.StandardShotSoundChanger();
                }

                //If alternate weapon was used
                if (e.Button == MouseButtons.Right)
                {
                    theController.WeaponFire("right");
                    panel.BeamShotSoundChanger();
                }
            }
        }