Beispiel #1
0
        /// <summary>
        /// Press the game button
        /// </summary>
        /// <param name="key"></param>
        private void PressGameButton(InputKey key)
        {
            GameButton gameButton = L.b.gameButtons[key.id];

            //check if possible to call
            if (!gameButton.req.Check(ActPlayer()))
            {
                OnMapUI.Get().ShowPanelMessageError(gameButton.req.Desc(ActPlayer()));
                return;
            }

            //call it
            NAudio.Play(gameButton.Sound);
            gameButton.Call(ActPlayer());
        }