diff options
| author | Teddy Wing | 2015-10-08 04:02:32 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-10-08 04:02:32 -0400 |
| commit | 7ca0e2b4e01b8b37405e6e7f25477bfae107c319 (patch) | |
| tree | eb66b1ff2795a32adad605ee0801d618e2342620 | |
| parent | e3efae83fc051284dacb5fd0ec71ef7f93a5925e (diff) | |
| download | vim-space-vlaze-7ca0e2b4e01b8b37405e6e7f25477bfae107c319.tar.bz2 | |
mappings#Initialize: Change mappings to `<nop>`
Since we're handling game actions in `mappings#Listen()` now, don't call
our functions from these normal mappings.
The reason for not doing so is because otherwise after you get a Game
Over you could still move the player around and fire missiles (although
doing so wouldn't affect your score).
Set these keys to `<nop>` so that they don't do their normal Vim
functions so we can maximise the feeling of being in the game world
versus being in a text editor. Otherwise you can move your cursor
around, record macros with `q`, and I'm just not sure I want to allow
all that in the game.
| -rw-r--r-- | autoload/space_vlaze/mappings.vim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/autoload/space_vlaze/mappings.vim b/autoload/space_vlaze/mappings.vim index bdf5bc9..dfeea7d 100644 --- a/autoload/space_vlaze/mappings.vim +++ b/autoload/space_vlaze/mappings.vim @@ -1,11 +1,11 @@ function! space_vlaze#mappings#Initialize() - nnoremap <silent><buffer> q :call space_vlaze#game#Quit()<cr> - nnoremap <silent><buffer> p :call space_vlaze#game#Pause()<cr> - nnoremap <silent><buffer> h :call space_vlaze#player#MoveLeft()<cr> - nnoremap <silent><buffer> j :call space_vlaze#player#MoveDown()<cr> - nnoremap <silent><buffer> k :call space_vlaze#player#MoveUp()<cr> - nnoremap <silent><buffer> l :call space_vlaze#player#MoveRight()<cr> - nnoremap <silent><buffer> <space> :call space_vlaze#player#FireBlasters()<cr> + nnoremap <silent><buffer> q <nop> + nnoremap <silent><buffer> p <nop> + nnoremap <silent><buffer> h <nop> + nnoremap <silent><buffer> j <nop> + nnoremap <silent><buffer> k <nop> + nnoremap <silent><buffer> l <nop> + nnoremap <silent><buffer> <space> <nop> endfunction |
