diff options
| author | Teddy Wing | 2015-10-08 03:52:38 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-10-08 03:52:38 -0400 |
| commit | 3887c225e1024fde6570a8c8984ea462ab04c0fb (patch) | |
| tree | 0eec085b14d47595ae63c729aa5b7776083fa75b /autoload/space_vlaze | |
| parent | f2ccd902a5f9534e2a8e83c65ec3875a81fefc26 (diff) | |
| download | vim-space-vlaze-3887c225e1024fde6570a8c8984ea462ab04c0fb.tar.bz2 | |
Add audio for player movement
Again created with Cfxr. (Godsend!)
Diffstat (limited to 'autoload/space_vlaze')
| -rw-r--r-- | autoload/space_vlaze/audio.vim | 5 | ||||
| -rw-r--r-- | autoload/space_vlaze/player.vim | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/autoload/space_vlaze/audio.vim b/autoload/space_vlaze/audio.vim index 18d3e7f..0aa38aa 100644 --- a/autoload/space_vlaze/audio.vim +++ b/autoload/space_vlaze/audio.vim @@ -13,3 +13,8 @@ endfunction function! space_vlaze#audio#PlayEnemyDefeated() call space_vlaze#audio#Play('enemy-defeated.wav') endfunction + + +function! space_vlaze#audio#PlayPlayerMove() + call space_vlaze#audio#Play('player-move.wav') +endfunction diff --git a/autoload/space_vlaze/player.vim b/autoload/space_vlaze/player.vim index dce2f04..48f6649 100644 --- a/autoload/space_vlaze/player.vim +++ b/autoload/space_vlaze/player.vim @@ -29,6 +29,7 @@ endfunction function! space_vlaze#player#MoveLeft() + call space_vlaze#audio#PlayPlayerMove() call space_vlaze#player#ClearPlayerCell() call space_vlaze#player#SetPlayerX(space_vlaze#player#PlayerX() - 1) call space_vlaze#enemy#HandlePlayerCollision() @@ -37,6 +38,7 @@ endfunction function! space_vlaze#player#MoveDown() + call space_vlaze#audio#PlayPlayerMove() call space_vlaze#player#ClearPlayerCell() call space_vlaze#player#SetPlayerY(space_vlaze#player#PlayerY() + 1) call space_vlaze#enemy#HandlePlayerCollision() @@ -45,6 +47,7 @@ endfunction function! space_vlaze#player#MoveUp() + call space_vlaze#audio#PlayPlayerMove() call space_vlaze#player#ClearPlayerCell() call space_vlaze#player#SetPlayerY(space_vlaze#player#PlayerY() - 1) call space_vlaze#enemy#HandlePlayerCollision() @@ -53,6 +56,7 @@ endfunction function! space_vlaze#player#MoveRight() + call space_vlaze#audio#PlayPlayerMove() call space_vlaze#player#ClearPlayerCell() call space_vlaze#player#SetPlayerX(space_vlaze#player#PlayerX() + 1) call space_vlaze#enemy#HandlePlayerCollision() |
