aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/player-move.wavbin0 -> 4308 bytes
-rw-r--r--autoload/space_vlaze/audio.vim5
-rw-r--r--autoload/space_vlaze/player.vim4
3 files changed, 9 insertions, 0 deletions
diff --git a/Resources/player-move.wav b/Resources/player-move.wav
new file mode 100644
index 0000000..59e9ac1
--- /dev/null
+++ b/Resources/player-move.wav
Binary files differ
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()