示例#1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
        private void CheatCode(object?sender, KeyEventArgs e)
        {
            if (e.Keys == Keys.NoKey || _foundKonamiCode)
            {
                return;
            }

            if (_konamiCode[_cursor] != e.Keys)
            {
                _cursor = 0;
                return;
            }

            _cursor++;

            if (_konamiCode.Length == _cursor + 1)
            {
                DinoGame.RequestCheatMode(); _ = _foundKonamiCode = true; // bravo
                Game.Instance.Explorer700.Display.Invert();
            }
        }